<template>
	<view class="container">
		<view class="header">
			<view class="headeritem" :class="{headeritems:data.state>0}">
				<text class="text">1</text>
				管理员信息
			</view>
			<view class="headeritem" :class="{headeritems:data.state>1}">
				<text class="text">2</text>
				主体资料
			</view>
			<view class="headeritem" :class="{headeritems:data.state>2}">
				<text class="text">3</text>
				经营资料
			</view>
			<view class="headeritem" style="margin-top: 10px;" :class="{headeritems:data.state>3}">
				<text class="text">4</text>
				店铺信息
			</view>
			<view class="headeritem" style="margin-top: 10px;" :class="{headeritems:data.state>4}">
				<text class="text">5</text>
				等待审核信息
			</view>
		</view>
		<view class="content">
			<view class="typelist" v-if="data.state==1">
				<view class="typeitem">
					<image src="https://img.fubaozx.cn/static/oldImg/16994999834937.png" mode=""
						v-if="txdata.contact_info.contact_type=='LEGAL'"
						@click="txdata.contact_info.contact_type='LEGAL'"></image>
					<image src="https://img.fubaozx.cn/static/oldImg/16995000058612.png" mode=""
						v-if="txdata.contact_info.contact_type=='SUPER'"
						@click="txdata.contact_info.contact_type='LEGAL'"></image>
					<view class="typetext">
						经营者/法人
					</view>
				</view>
				<view class="typeitem">
					<image src="https://img.fubaozx.cn/static/oldImg/16995000525758.png" mode=""
						v-if="txdata.contact_info.contact_type=='SUPER'"
						@click="txdata.contact_info.contact_type='SUPER'"></image>
					<image src="https://img.fubaozx.cn/static/oldImg/16995000797396.png" mode=""
						v-if="txdata.contact_info.contact_type=='LEGAL'"
						@click="txdata.contact_info.contact_type='SUPER'"></image>
					<view class="typetext">
						经办人
					</view>
				</view>
			</view>
			<uni-forms label-width="100px" style="margin-top: 20px;" ref="baseForm" :modelValue="baseFormData">
				<view class="content" v-if="data.state==1">
					<uni-forms-item label="证件类型" required v-if="txdata.contact_info.contact_type=='SUPER'">
						<uni-data-select v-model="txdata.contact_info.contact_id_doc_type" :localdata="data.range"
							@change="changedoc_type"></uni-data-select>
					</uni-forms-item>
					<uni-forms-item label="证件正面照片" required
						v-if="txdata.contact_info.contact_id_doc_type == 'IDENTIFICATION_TYPE_IDCARD' && txdata.contact_info.contact_type=='SUPER'">
						<view class="upbox" v-if="!imgobj.contact_id_doc_copy" @click="$Uplode(contact_id_doc_copy)">
							<image src="https://img.fubaozx.cn/static/oldImg/16995001139065.png" mode=""></image>
							<view class="">
								上传身份证正面
							</view>
						</view>
						<view class="upboxs" v-else @click="$Uplode(contact_id_doc_copy)">
							<image :src="imgobj.contact_id_doc_copy" mode=""></image>
						</view>
					</uni-forms-item>
					<uni-forms-item label="证件反面照片" required
						v-if="txdata.contact_info.contact_id_doc_type == 'IDENTIFICATION_TYPE_IDCARD' && txdata.contact_info.contact_type=='SUPER'">
						<view class="upbox" v-if="!imgobj.contact_id_doc_copy_back"
							@click="$Uplode(contact_id_doc_copy_back)">
							<image src="https://img.fubaozx.cn/static/oldImg/16995001139065.png" mode=""></image>
							<view class="">
								上传身份证反面
							</view>
						</view>
						<view class="upboxs" v-else @click="$Uplode(contact_id_doc_copy_back)">
							<image :src="imgobj.contact_id_doc_copy_back" mode=""></image>
						</view>
					</uni-forms-item>
					<uni-forms-item label="姓名" required>
						<uni-easyinput v-model="txdata.contact_info.contact_name" placeholder="请输入姓名" />
					</uni-forms-item>

					<uni-forms-item label="身份证件号码" required v-if="txdata.contact_info.contact_type=='SUPER'">
						<uni-easyinput v-model="txdata.contact_info.contact_id_number" placeholder="请输入姓名" />
					</uni-forms-item>

					<uni-forms-item label="证件有效期开始时间" required v-if="txdata.contact_info.contact_type=='SUPER'">
						<uni-datetime-picker type="date" :clear-icon="false"
							v-model="txdata.contact_info.contact_period_begin" @maskClick="maskClick" />
					</uni-forms-item>
					<uni-forms-item label="证件有效期结束时间" required v-if="txdata.contact_info.contact_type=='SUPER'">
						<!-- <uni-datetime-picker type="date" :clear-icon="false"
							v-model="txdata.contact_info.contact_period_end" @maskClick="maskClick" /> -->

						<view style="display: flex;align-items: center;width: 100%;">
							<uni-easyinput disabled style="width: 67%;flex: none;"
								v-if="txdata.contact_info.contact_period_end == '长期'"
								v-model="txdata.contact_info.contact_period_end" />

							<uni-datetime-picker v-else style="width: 67%;flex: none;" type="date" :clear-icon="false"
								v-model="txdata.contact_info.contact_period_end" @maskClick="maskClick" />

							<uni-data-checkbox style="width: 33%;margin-left: 10upx;"
								v-model="txdata.contact_info.contact_period_end"
								:change="changeCheckbox(txdata.contact_info.contact_period_end)"
								@click="txdata.contact_info.contact_period_end=='长期'?txdata.contact_info.contact_period_end='':''"
								:localdata="[{text:'长期',value:'长期'}]">
							</uni-data-checkbox>
						</view>

					</uni-forms-item>
					<uni-forms-item label="业务办理授权函" required v-if="txdata.contact_info.contact_type=='SUPER'">
						<view class="upbox" v-if="!imgobj.business_authorization_letter"
							@click="$Uplode(business_authorization_letter)">
							<image src="https://img.fubaozx.cn/static/oldImg/16995001139065.png" mode=""></image>
							<view class="">
								业务办理授权函
							</view>
						</view>
						<view class="upboxs" v-else @click="$Uplode(business_authorization_letter)">
							<image :src="imgobj.business_authorization_letter" mode=""></image>
						</view>
					</uni-forms-item>
					<!-- 	<uni-forms-item label="微信OpenID" required v-if="txdata.contact_info.contact_type=='SUPER'">
						<uni-easyinput v-model="txdata.contact_info.openid" placeholder="请输入姓名" />
					</uni-forms-item> -->
					<uni-forms-item label="联系手机" required>
						<uni-easyinput v-model="txdata.contact_info.mobile_phone" placeholder="请输入联系手机" />
					</uni-forms-item>
					<uni-forms-item label="联系邮箱" required>
						<uni-easyinput v-model="txdata.contact_info.contact_email" placeholder="请输入联系邮箱" />
					</uni-forms-item>
				</view>
				<view class="content" v-if="data.state==2">
					<uni-forms-item label="主体类型" required>
						<uni-data-select v-model="txdata.subject_info.subject_type" :localdata="data.subjectarr"
							@change="changesubject_type"></uni-data-select>
					</uni-forms-item>
					<uni-forms-item label="是否是金融机构" required>
						<uni-data-checkbox v-model="txdata.subject_info.finance_institution"
							:localdata="data.finance"></uni-data-checkbox>
					</uni-forms-item>
					<view
						v-if="txdata.subject_info.subject_type=='SUBJECT_TYPE_INDIVIDUAL' || txdata.subject_info.subject_type=='SUBJECT_TYPE_ENTERPRISE'">
						<uni-forms-item label="营业执照照片" required>
							<view class="upbox" v-if="!imgobj.license_copy" @click="$Uplode(license_copy)">
								<image src="https://img.fubaozx.cn/static/oldImg/16995001139065.png" mode=""></image>
								<view class="">
									营业执照照片
								</view>
							</view>
							<view class="upboxs" v-else @click="$Uplode(license_copy)">
								<image :src="imgobj.license_copy" mode=""></image>
							</view>
						</uni-forms-item>
						<uni-forms-item label="注册号/统一社会信用代码" required>
							<uni-easyinput v-model="txdata.subject_info.business_license_info.license_number"
								placeholder="请输入注册号/统一社会信用代码" />
						</uni-forms-item>
						<uni-forms-item label="商户名称" required>
							<uni-easyinput v-model="txdata.subject_info.business_license_info.merchant_name"
								placeholder="请输入商户名称" />
						</uni-forms-item>
						<uni-forms-item label="个体户经营者/法人姓名" required>
							<uni-easyinput v-model="txdata.subject_info.business_license_info.legal_person"
								placeholder="请输入经营者/法人姓名" />
						</uni-forms-item>
						<uni-forms-item label="注册地址" required>
							<uni-easyinput v-model="txdata.subject_info.business_license_info.license_address"
								placeholder="请输入注册地址" />
						</uni-forms-item>
						<uni-forms-item label="有效期限开始日期" required>
							<uni-datetime-picker type="date" :clear-icon="false"
								v-model="txdata.subject_info.business_license_info.period_begin	"
								@maskClick="maskClick" />
						</uni-forms-item>
						<!--		<uni-forms-item label="有效期限结束日期" >
							<uni-datetime-picker type="date" :clear-icon="false"
								v-model="txdata.subject_info.business_license_info.period_end	" @maskClick="maskClick" />
						</uni-forms-item> -->
					</view>
					<uni-section title="经营者/法人身份证件" type="line">
						<uni-forms-item label="证件持有人类型" required>
							<uni-data-checkbox v-model="txdata.subject_info.identity_info.id_holder_type"
								:localdata="data.holder"></uni-data-checkbox>
						</uni-forms-item>
						<uni-forms-item label="证件类型" required
							v-if="txdata.subject_info.identity_info.id_holder_type == 'LEGAL'">
							<uni-data-select v-model="txdata.subject_info.identity_info.id_doc_type"
								:localdata="data.range" @change="changedid_doc_type"></uni-data-select>
						</uni-forms-item>
						<uni-forms-item label="法定代表人说明函" required
							v-if="txdata.subject_info.identity_info.id_holder_type == 'SUPER'">
							<view class="upbox" v-if="!imgobj.authorize_letter_copy"
								@click="$Uplode(authorize_letter_copy)">
								<image src="https://img.fubaozx.cn/static/oldImg/16995001139065.png" mode=""></image>
								<view class="">
									法定代表人说明函
								</view>
							</view>
							<view class="upboxs" v-else @click="$Uplode(authorize_letter_copy)">
								<image :src="imgobj.authorize_letter_copy" mode=""></image>
							</view>
						</uni-forms-item>

						<view v-if="data.istype">
							<uni-forms-item label="身份证人像面照片" required>
								<view class="upbox" v-if="!imgobj.id_card_copy" @click="$Uplode(id_card_copy)">
									<image src="https://img.fubaozx.cn/static/oldImg/16995001139065.png" mode=""></image>
									<view class="">
										身份证人像面照片
									</view>
								</view>

								<view class="upboxs" v-else @click="$Uplode(id_card_copy)">
									<image :src="imgobj.id_card_copy" mode=""></image>
								</view>
							</uni-forms-item>
							<uni-forms-item label="身份证国徽面照片" required>
								<view class="upbox" v-if="!imgobj.id_card_national" @click="$Uplode(id_card_national)">
									<image src="https://img.fubaozx.cn/static/oldImg/16995001139065.png" mode=""></image>
									<view class="">
										身份证国徽面照片
									</view>
								</view>
								<view class="upboxs" v-else @click="$Uplode(id_card_national)">
									<image :src="imgobj.id_card_national" mode=""></image>
								</view>
							</uni-forms-item>
							<uni-forms-item label="身份证姓名" required>
								<uni-easyinput v-model="txdata.subject_info.identity_info.id_card_info.id_card_name"
									placeholder="请输入身份证姓名" />
							</uni-forms-item>
							<uni-forms-item label="身份证号码" required>
								<uni-easyinput v-model="txdata.subject_info.identity_info.id_card_info.id_card_number"
									placeholder="请输入身份证号码" />
							</uni-forms-item>
							<uni-forms-item label="身份证居住地址" required>
								<uni-easyinput v-model="txdata.subject_info.identity_info.id_card_info.id_card_address"
									placeholder="请输入身份证居住地址" />
							</uni-forms-item>
							<uni-forms-item label="身份证有效期开始时间" required>
								<uni-datetime-picker type="date" :clear-icon="false"
									v-model="txdata.subject_info.identity_info.id_card_info.card_period_begin	"
									@maskClick="maskClick" />
							</uni-forms-item>
							<uni-forms-item label="身份证有效期结束时间" required>
								<view style="display: flex;align-items: center;width: 100%;">
									<uni-easyinput disabled style="width: 67%;flex: none;"
										v-if="txdata.subject_info.identity_info.id_card_info.card_period_end == '长期'"
										v-model="txdata.subject_info.identity_info.id_card_info.card_period_end" />

									<uni-datetime-picker v-else style="width: 67%;flex: none;" type="date"
										:clear-icon="false"
										v-model="txdata.subject_info.identity_info.id_card_info.card_period_end"
										@maskClick="maskClick" />

									<uni-data-checkbox style="width: 33%;margin-left: 10upx;"
										v-model="txdata.subject_info.identity_info.id_card_info.card_period_end"
										:change="changeCheckbox(txdata.subject_info.identity_info.id_card_info.card_period_end)"
										@click="txdata.subject_info.identity_info.id_card_info.card_period_end=='长期'?txdata.subject_info.identity_info.id_card_info.card_period_end='':''"
										:localdata="[{text:'长期',value:'长期'}]">
									</uni-data-checkbox>
								</view>
							</uni-forms-item>

						</view>
						<view v-else>
							<uni-forms-item label="证件正面照片" required>
								<view class="upbox" v-if="!imgobj.id_doc_copy" @click="$Uplode(id_doc_copy)">
									<image src="https://img.fubaozx.cn/static/oldImg/16995001139065.png" mode=""></image>
									<view class="">
										证件正面照片
									</view>
								</view>
								<view class="upboxs" v-else @click="$Uplode(id_doc_copy)">
									<image :src="imgobj.id_doc_copy" mode=""></image>
								</view>
							</uni-forms-item>
							<uni-forms-item label="证件反面照片" required>
								<view class="upbox" v-if="!imgobj.id_doc_copy_backs"
									@click="$Uplode(id_doc_copy_backs)">
									<image src="https://img.fubaozx.cn/static/oldImg/16995001139065.png" mode=""></image>
									<view class="">
										证件反面照片
									</view>
								</view>
								<view class="upboxs" v-else @click="$Uplode(id_doc_copy_backs)">
									<image :src="imgobj.id_doc_copy_backs" mode=""></image>
								</view>
							</uni-forms-item>
							<uni-forms-item label="证件姓名" required>
								<uni-easyinput v-model="txdata.subject_info.identity_info.id_doc_info.id_doc_name"
									placeholder="请输入证件姓名" />
							</uni-forms-item>
							<uni-forms-item label="证件号码" required>
								<uni-easyinput v-model="txdata.subject_info.identity_info.id_doc_info.id_doc_number"
									placeholder="请输入证件号码" />
							</uni-forms-item>
							<uni-forms-item label="证件居住地址" required>
								<uni-easyinput v-model="txdata.subject_info.identity_info.id_doc_info.id_doc_address"
									placeholder="请输入证件居住地址" />
							</uni-forms-item>
							<uni-forms-item label="身份证有效期开始时间" required>
								<uni-datetime-picker type="date" :clear-icon="false"
									v-model="txdata.subject_info.identity_info.id_doc_info.doc_period_begin	"
									@maskClick="maskClick" />
							</uni-forms-item>
							<uni-forms-item label="身份证有效期结束时间" required>
								<!-- <uni-datetime-picker type="date" :clear-icon="false"
									v-model="txdata.subject_info.identity_info.id_doc_info.doc_period_end"
									@maskClick="maskClick" /> -->

								<view style="display: flex;align-items: center;width: 100%;">
									<uni-easyinput disabled style="width: 67%;flex: none;"
										v-if="txdata.subject_info.identity_info.id_doc_info.doc_period_end == '长期'"
										v-model="txdata.subject_info.identity_info.id_doc_info.doc_period_end" />

									<uni-datetime-picker v-else style="width: 67%;flex: none;" type="date"
										:clear-icon="false"
										v-model="txdata.subject_info.identity_info.id_doc_info.doc_period_end"
										@maskClick="maskClick" />

									<uni-data-checkbox multiple style="width: 33%;margin-left: 10upx;"
										v-model="txdata.subject_info.identity_info.id_doc_info.doc_period_end"
										:change="changeCheckbox(txdata.subject_info.identity_info.id_doc_info.doc_period_end)"
										:localdata="[{text:'长期',value:1}]">
									</uni-data-checkbox>

									<uni-data-checkbox style="width: 33%;margin-left: 10upx;"
										v-model="txdata.subject_info.identity_info.id_doc_info.doc_period_end"
										:change="changeCheckbox(txdata.subject_info.identity_info.id_doc_info.doc_period_end)"
										@click="txdata.subject_info.identity_info.id_doc_info.doc_period_end=='长期'?txdata.subject_info.identity_info.id_doc_info.doc_period_end='':''"
										:localdata="[{text:'长期',value:'长期'}]">
									</uni-data-checkbox>
								</view>

							</uni-forms-item>
						</view>
						<view v-if="txdata.subject_info.subject_type=='SUBJECT_TYPE_ENTERPRISE'">

							<!-- 这里要加按钮 -->
							<uni-section title="最终受益人信息列表(UBO)" type="line">
								<view
									style="display: flex; justify-content: flex-end; align-items: center; margin-bottom: 10px;"
									@click="addlist">
									<uni-icons type="plusempty" size="30"></uni-icons>
									<view style="margin-left: 5px; margin-right: 10px;">添加受益人</view>
								</view>
								<view v-for="(it,i) in txdata.subject_info.ubo_info_list" :key="i">
									<uni-forms-item label="证件类型" required style="margin-top: 20px;">
										<uni-data-select v-model="it.ubo_id_doc_type" :localdata="data.range"
											@change="changedoc_type"></uni-data-select>
									</uni-forms-item>
									<uni-forms-item label="证件正面照片" required>
										<view class="upbox" v-if="!imgobj.ubo_id_doc_copy[i]"
											@click="$Uplode(ubo_id_doc_copy,i)">
											<image src="https://img.fubaozx.cn/static/oldImg/16995001139065.png" mode="">
											</image>
											<view class="">
												证件正面照片
											</view>
										</view>
										<view class="upboxs" v-else @click="$Uplode(ubo_id_doc_copy,i)">
											<image :src="imgobj.ubo_id_doc_copy[i]" mode=""></image>
										</view>
									</uni-forms-item>
									<uni-forms-item label="证件反面照片" required>
										<view class="upbox" v-if="!imgobj.ubo_id_doc_copy_back[i]"
											@click="$Uplode(ubo_id_doc_copy_back,i)">
											<image src="https://img.fubaozx.cn/static/oldImg/16995001139065.png" mode="">
											</image>
											<view class="">
												证件反面照片
											</view>
										</view>
										<view class="upboxs" v-else @click="$Uplode(ubo_id_doc_copy_back,i)">
											<image :src="imgobj.ubo_id_doc_copy_back[i]" mode=""></image>
										</view>
									</uni-forms-item>
									<uni-forms-item label="证件姓名" required>
										<uni-easyinput v-model="it.ubo_id_doc_name" placeholder="请输入证件姓名" />
									</uni-forms-item>
									<uni-forms-item label="证件号码" required>
										<uni-easyinput v-model="it.ubo_id_doc_number" placeholder="请输入证件号码" />
									</uni-forms-item>
									<uni-forms-item label="证件居住地址" required>
										<uni-easyinput v-model="it.ubo_id_doc_address" placeholder="请输入证件居住地址" />
									</uni-forms-item>
									<uni-forms-item label="身份证有效期开始时间" required>
										<uni-datetime-picker type="date" :clear-icon="false"
											v-model="it.ubo_period_begin	" @maskClick="maskClick" />
									</uni-forms-item>
									<uni-forms-item label="身份证有效期结束时间" required>
										<!-- <uni-datetime-picker type="date" :clear-icon="false"
											v-model="it.ubo_period_end	" @maskClick="maskClick" /> -->

										<view style="display: flex;align-items: center;width: 100%;">
											<uni-easyinput disabled style="width: 67%;flex: none;"
												v-if="it.ubo_period_end == '长期'" v-model="it.ubo_period_end" />

											<uni-datetime-picker v-else style="width: 67%;flex: none;" type="date"
												:clear-icon="false" v-model="it.ubo_period_end	"
												@maskClick="maskClick" />

											<!-- <uni-data-checkbox multiple style="width: 33%;margin-left: 10upx;"
												v-model="it.ubo_period_end" :localdata="[{text:'长期',value:'长期'}]">
											</uni-data-checkbox> -->

											<uni-data-checkbox style="width: 33%;margin-left: 10upx;"
												v-model="it.ubo_period_end" :change="changeCheckbox(it.ubo_period_end)"
												@click="it.ubo_period_end=='长期'?it.ubo_period_end='':''"
												:localdata="[{text:'长期',value:'长期'}]">
											</uni-data-checkbox>
										</view>

									</uni-forms-item>
									<view @click="dellist(i)"
										style="display: flex; justify-content: flex-end; align-items: center; margin-bottom: 20px; "
										v-if="txdata.subject_info.ubo_info_list.length>1 && i!==0">
										<uni-icons type="closeempty" size="30"></uni-icons>
										<view style="margin-left: 5px; margin-right: 10px;">删除受益人</view>
									</view>
									<view style="border-bottom: 1px solid #ccc;"></view>
								</view>

							</uni-section>
						</view>
					</uni-section>
				</view>

				<view class="content" v-if="data.state == 3">
					<uni-forms-item label="商户简称" required>
						<uni-easyinput v-model="txdata.business_info.merchant_shortname" placeholder="请输入商户简称" />
					</uni-forms-item>
					<uni-forms-item label="客服电话" required>
						<uni-easyinput v-model="txdata.business_info.service_phone" placeholder="请输入客服电话" />
					</uni-forms-item>
					<uni-section title="结算规则" type="line">
						<uni-forms-item label="所属行业" required>
							<uni-data-picker :localdata="data.settlementarr" v-model="data.settlement"
								popup-title="请选择所属行业" @change="onnodeclick"></uni-data-picker>
						</uni-forms-item>
						<view style="margin: 10px 0px;color: #999; ">{{data.onnode.description}}</view>
						<uni-forms-item label="特殊资质图片" required v-if="data.onnode.required">
							<view class="upbox" v-if="!imgobj.qualifications" @click="$Uplode(qualifications)">
								<image src="https://img.fubaozx.cn/static/oldImg/16995001139065.png" mode=""></image>
								<view class="">
									特殊资质图片
								</view>
							</view>
							<view class="upboxs" v-else @click="$Uplode(qualifications)">
								<image :src="imgobj.qualifications" mode=""></image>
							</view>
						</uni-forms-item>
					</uni-section>
					<uni-section title="结算银行账户" type="line">
						<uni-forms-item label="账户类型" required>
							<uni-data-select v-model="txdata.bank_account_info.bank_account_type"
								:localdata="data.bankaccarr" @change="changedoc_type"></uni-data-select>
						</uni-forms-item>
						<uni-forms-item label="开户名称" required>
							<uni-easyinput v-model="txdata.bank_account_info.account_name" placeholder="请输入开户名称" />
						</uni-forms-item>
						<uni-forms-item label="开户银行" required>
							<uni-data-select v-model="txdata.bank_account_info.account_bank" :localdata="data.bankarr"
								@change="changebank"></uni-data-select>
						</uni-forms-item>

						<uni-forms-item label="开户银行省市区" required>
							<uni-data-picker :localdata="data.bankarrcode" v-model="data.account_bank"
								popup-title="请选择开户银行" @change="changebankcode"></uni-data-picker>
						</uni-forms-item>
						<uni-forms-item label="开户银行省市编码" required>
							<uni-easyinput v-model="txdata.bank_account_info.bank_address_code"
								placeholder="请输入开户银行省市编码" />
						</uni-forms-item>
						<uni-forms-item label="银行账号" required>
							<uni-easyinput v-model="txdata.bank_account_info.account_number" placeholder="请输入银行账号" />
						</uni-forms-item>
					</uni-section>
					<uni-section title="补充材料" type="line">
						<uni-forms-item label="法人开户承诺函">
							<view class="upbox" v-if="!imgobj.legal_person_commitment"
								@click="$Uplode(legal_person_commitment)">
								<image src="https://img.fubaozx.cn/static/oldImg/16995001139065.png" mode=""></image>
								<view class="">
									法人开户承诺函
								</view>
							</view>
							<view class="upboxs" v-else @click="$Uplode(legal_person_commitment)">
								<image :src="imgobj.legal_person_commitment" mode=""></image>
							</view>
						</uni-forms-item>
						<uni-forms-item label="法人开户意愿视频">
							<view class="upbox" v-if="!imgobj.legal_person_video"
								@click="$UplodeVideo(legal_person_video)">
								<image src="https://img.fubaozx.cn/static/oldImg/16995001139065.png" mode=""></image>
								<view class="">
									法人开户意愿视频
								</view>
							</view>
							<view class="upboxs" v-else @click="$UplodeVideo(legal_person_video)">
								<video :src="imgobj.legal_person_video" mode=""></video>
							</view>
						</uni-forms-item>
						<uni-forms-item label="补充材料">
							<view class="upbox" v-if="!imgobj.pics" @click="$Uplode(business_addition_pics)">
								<image src="https://img.fubaozx.cn/static/oldImg/16995001139065.png" mode=""></image>
								<view class="">
									补充材料
								</view>
							</view>
							<view class="upboxs" v-else @click="$Uplode(business_addition_pics)">
								<image :src="imgobj.pics" mode=""></image>
							</view>
						</uni-forms-item>
						<uni-forms-item label="补充说明">
							<uni-easyinput type="textarea" v-model="txdata.addition_info.business_addition_msg"
								placeholder="请输入补充说明" />
						</uni-forms-item>
					</uni-section>
				</view>
				<view class="content" v-if="data.state == 4">
					<uni-forms-item label="店铺名称" required>
						<uni-easyinput v-model="txdata.name" placeholder="请输入店铺名称" />
					</uni-forms-item>
<!--					<uni-forms-item label="开店方式" required>-->
<!--						<uni-data-select v-model="txdata.shop_code" :localdata="data.shoprbge" @change="changecode"-->
<!--							:clear="false"></uni-data-select>-->
<!--					</uni-forms-item>-->
					<uni-forms-item label="商铺类型" required>
						<uni-data-select v-model="txdata.shop_class_id" :localdata="data.shopClassList"
							@change="changeshopClass" :clear="false"></uni-data-select>
					</uni-forms-item>
					<uni-forms-item label="店铺门头照" required>
						<view class="upbox" v-if="!txdata.shop_head" @click="$Uplode(shop_head)">
							<image src="https://img.fubaozx.cn/static/oldImg/16995001139065.png" mode=""></image>
							<view class="">
								店铺门头照
							</view>
						</view>
						<view class="upboxs" v-else @click="$Uplode(shop_head)">
							<image :src="txdata.shop_head" mode=""></image>
						</view>
					</uni-forms-item>
					<uni-forms-item label="店铺地址" required>
						<view class="" style="padding: 20upx;border: 1upx solid #eee;">
							<lcw-select-address v-if="data.state == 4" ref="lcwAddressRef" :address="data.address"
								@change="addresschange"></lcw-select-address>
						</view>
					</uni-forms-item>
					<uni-forms-item label="详细地址" required>
						<uni-easyinput type="textarea" v-model="txdata.address" placeholder="请输入内容"
							:disabled="data.statetype"></uni-easyinput>
					</uni-forms-item>
				</view>
			</uni-forms>
		</view>


		<view class="content" v-if="data.state==5">
			<view class="lastbox" v-if="!data.errdata">
				<image src="https://img.fubaozx.cn/static/oldImg/1699500155198.png" mode="aspectFill"></image>
				<view class="title">
					提交成功
				</view>
				<view class="titles">
					正在审核处理中，请耐心等待……
				</view>
			</view>
			<view class="lastbox" v-else>
				<!-- <image src="https://img.fubaozx.cn/static/oldImg/16995001877708.png" mode="aspectFill"></image> -->
				<view class="title">
					{{data.applyment}}
				</view>
				<view class="titles" v-if="data.reason">
					{{data.reason}}
				</view>
				<view class="titles" v-if="data.reback">
					可<text @click="data.state=1">点击修改</text>后重新提交资料进行审核~
				</view>
				<view style="margin: 0px 40upx; " v-if="data.sign_url">
					<image style="width: 500rpx; height:500rpx; " :src="data.sign_url" mode="aspectFill"></image>
					<!-- 	<l-painter isCanvasToTempFilePath @success="paintersuccess" hidden
						css="width: 300px;height: 350px;padding:20px;border-radius: 20px;">
						<l-painter-view css="margin-top:10px;">
							<l-painter-qrcode css="width:300px; height: 350px; border-radius: 12rpx;margin:20rpx auto;"
								:text="data.sign_url"></l-painter-qrcode>
						</l-painter-view>
					</l-painter> -->
				</view>
			</view>
		</view>
		<view class="next" @click="data.state++" v-if="data.state<4">
			下一步
		</view>
		<view class="next" @click="applyBusiness(1)" v-if="data.state==4">
			提交
		</view>
		<view class="next" @click="applyBusiness(0)" v-if="data.state<5">
			保存到草稿
		</view>

		<view class="nexts" @click="data.state--" v-if="data.state>1&&data.state<5">
			返回上一步
		</view>
		<view class="next" @click="back" v-if="data.state==5&&data.errdata">
			返回个人中心
		</view>

	</view>
</template>

<script setup>
	// import ayQrcode from "@/components/ay-qrcode/ay-qrcode.vue"
	import {
		ref,
		reactive,
		getCurrentInstance
	} from "vue";
	import {
		onLoad,
		onShow,
		onPullDownRefresh,
		onReachBottom
	} from "@dcloudio/uni-app";
	const {
		proxy
	} = getCurrentInstance();
	let txdata = ref({
		//一下的内部需要的
		name: '', //店铺姓名
		latitude: '', //纬度
		longitude: '', //精度
		shop_head: '', //店铺门头照
		province: '', //省
		city: '', //市
		area: '', //区
		street: '', //街道
		state: 0, //(0，'待审核')，(1，'成功')，(2，'失败')
		shop_code: 1, //(0，'供应链")，(1，'本地生活')，
		start_time: '', //营业时间
		end_time: '', //营业时间
		img: '', //轮播图片
		shop_class_id: 0, //店铺分类
		//以下是腾讯需要的
		contact_info: { //超级管理员信息
			contact_type: 'LEGAL', //超级管理员类型
			contact_name: '', //超级管理员姓名
			contact_id_doc_type: 'IDENTIFICATION_TYPE_IDCARD', //超级管理员证件类型
			contact_id_number: '', //超级管理员身份证件号码
			contact_id_doc_copy: '', //超级管理员证件正面照片
			contact_id_doc_copy_back: '', //超级管理员证件反面照片
			contact_period_begin: '', //超级管理员证件有效期开始时间
			contact_period_end: '', //超级管理员证件有效期结束时间
			business_authorization_letter: '', //业务办理授权函
			openid: '', //超级管理员微信OpenID
			mobile_phone: '', //联系手机
			contact_email: '', //联系邮箱

		},
		subject_info: { //主体资料
			subject_type: 'SUBJECT_TYPE_INDIVIDUAL', //主体类型
			finance_institution: false, //是否是金融机构 1、若商户主体是金融机构，则填写：true。2、若商户主体不是金融机构，则填写：false。
			business_license_info: { //营业执照 主体为个体户/企业，必填
				license_copy: '', //营业执照照片
				license_number: '', //注册号/统一社会信用代码
				merchant_name: '', //商户名称
				legal_person: '', //个体户经营者/法人姓名
				license_address: '', //注册地址
				period_begin: '', //有效期限开始日期
				period_end: '长期', //有效期限结束日期
			},
			certificate_info: { //登记证书 主体为政府机关/事业单位/其他组织时，必填。
				cert_copy: '', //登记证书照片
				cert_type: '', //登记证书类型
				cert_number: '', //证书号
				merchant_name: '', //商户名称
				company_address: '', //注册地址
				legal_person: '', //法定代表人
				period_begin: '', //有效期限开始日期
				period_end: '', //有效期限结束日期
				certificate_letter_copy: '', //单位证明函照片
				certificate_letter_copy: '', //单位证明函照片
			},
			finance_institution_info: { //金融机构许可证信息  当主体是金融机构时，必填。
				finance_type: "", //金融机构类型
				finance_license_pics: "", //金融机构许可证图片
			},
			identity_info: { //经营者/法人身份证件
				id_holder_type: 'LEGAL', //证件持有人类型 主体类型为政府机关、事业单位时选传：
				id_doc_type: "IDENTIFICATION_TYPE_IDCARD", //证件类型  当证件持有人类型为法人时，填写。其他情况，无需上传。
				authorize_letter_copy: "", //法定代表人说明函  、当证件持有人类型为经办人时，必须上传。其他情况，无需上传
				id_card_info: { //当证件持有人类型为经营者/法人且证件类型为“身份证”时填写。
					id_card_copy: "", //份证人像面照片
					id_card_national: "", //身份证国徽面照片
					id_card_name: "", //身份证姓名
					id_card_number: "", //身份证号码
					id_card_address: "", //身份证居住地址
					card_period_begin: "", //身份证有效期开始时间
					card_period_end: "", //身份证有效期结束时间
				},
				id_doc_info: { // 其他类型证件信息 当证件持有人类型为经营者/法人且证件类型不为“身份证”时填写。
					id_doc_copy: '', //证件正面照片
					id_doc_copy_back: '', //证件反面照片
					id_doc_name: '', //证件姓名
					id_doc_number: '', //证件号码
					id_doc_address: '', //证件居住地址
					doc_period_begin: '', //证件有效期开始时间
					doc_period_end: '', //证件有效期结束时间
				},
				owner: false, //经营者/法人是否为受益人 1、若经营者/法人是最终受益人，则填写：true。2、若经营者/法人不是最终受益人，则填写：false。
			},

			ubo_info_list: []
		},
		business_info: { //经营资料
			merchant_shortname: '', //商户简称
			service_phone: '', //客服电话
		},
		settlement_info: { //结算规则
			settlement_id: '', //入驻结算规则ID
			qualification_type: '', //所属行业
			qualifications: [], //特殊资质图片
		},
		bank_account_info: { //结算银行账户
			bank_account_type: '', //账户类型
			account_name: '', //开户名称
			account_bank: '', //开户银行
			bank_address_code: '', //开户银行省市编码
			bank_branch_id: '', //开户银行联行号
			bank_name: '', //开户银行全称（含支行）
			account_number: '', //银行账号
		},
		addition_info: { //补充材料
			legal_person_commitment: '', //法人开户承诺函
			legal_person_video: '', //法人开户意愿视频
			business_addition_pics: [], //补充材料
			business_addition_msg: '', //补充说明
		},
		code: 0, //0，1 保存对象  1发送到tx..
	})
	//校验规则
	const baseFormData = reactive({
		contact_name: '',
		contact_id_doc_type: '',
		contact_id_number: '',
		contact_id_doc_copy: '',
		contact_id_doc_copy_back: '',
		contact_period_begin: '',
		contact_period_end: '',
		business_authorization_letter: '',
		openid: '',
		mobile_phone: '',
		contact_email: '',
	})
	const data = reactive({

		shopClassList: [], //商家类型
		shoprbge: [{
				value: 0,
				text: "供应链"
			},
			{
				value: 1,
				text: "本地生活"
			},
		],
		codeShow: false,
		tempFilePath: '',
		sign_url: '',
		account_bank: '', //开户银行省市区
		errmsg: '',
		state: 1,
		applyment_state_msg: '',
		applyment: '审核失败',
		reback: true,
		errdata: false,
		value: 0,
		address: {},
		range: [{ //证件类型
				value: 'IDENTIFICATION_TYPE_IDCARD',
				text: "中国大陆居民-身份证"
			},
			{
				value: 'IDENTIFICATION_TYPE_OVERSEA_PASSPORT',
				text: "其他国家或地区居民-护照"
			},
			{
				value: 'IDENTIFICATION_TYPE_HONGKONG_PASSPORT',
				text: "中国香港居民-来往内地通行证"
			},
			{
				value: 'IDENTIFICATION_TYPE_MACAO_PASSPORT',
				text: "中国澳门居民-来往内地通行证"
			},
			{
				value: 'IDENTIFICATION_TYPE_TAIWAN_PASSPORT',
				text: "中国台湾居民-来往大陆通行证"
			},
			{
				value: 'IDENTIFICATION_TYPE_FOREIGN_RESIDENT',
				text: "外国人居留证"
			},
			{
				value: 'IDENTIFICATION_TYPE_HONGKONG_MACAO_RESIDENT',
				text: "港澳居民证"
			},
			{
				value: 'IDENTIFICATION_TYPE_TAIWAN_RESIDENT',
				text: "台湾居民证"
			},
		],
		subjectarr: [ //主体类型
			{
				value: 'SUBJECT_TYPE_INDIVIDUAL',
				text: "个体户"
			},
			{
				value: 'SUBJECT_TYPE_ENTERPRISE',
				text: "企业"
			},
			{
				value: 'SUBJECT_TYPE_GOVERNMENT',
				text: "政府机关"
			},
			{
				value: 'SUBJECT_TYPE_INSTITUTIONS',
				text: "事业单位"
			},
			{
				value: 'SUBJECT_TYPE_OTHERS',
				text: "社会组织"
			},
		],
		finance: [ //是否是金融机构
			{
				value: true,
				text: "是"
			},
			{
				value: false,
				text: "否"
			},
		],
		holder: [ //证件持有人类型
			{
				value: 'LEGAL',
				text: "法人"
			},
			{
				value: 'SUPER',
				text: "经办人"
			},
		],
		bankaccarr: [ //证件持有人类型
			{
				value: 'BANK_ACCOUNT_TYPE_CORPORATE',
				text: "对公银行账户"
			},
			{
				value: 'BANK_ACCOUNT_TYPE_PERSONAL',
				text: "经营者个人银行卡"
			},
		],
		settlementarr: [], //结算规则
		settlement: 0,
		bankarrcode: [],
		bankarr: [{
				value: "工商银行",
				text: "工商银行"
			},
			{
				value: "交通银行",
				text: "交通银行"
			},
			{
				value: "招商银行",
				text: "招商银行"
			},
			{
				value: "民生银行",
				text: "民生银行"
			},
			{
				value: "中信银行",
				text: "中信银行"
			},
			{
				value: "浦发银行",
				text: "浦发银行"
			},
			{
				value: "兴业银行",
				text: "兴业银行"
			},
			{
				value: "光大银行",
				text: "光大银行"
			},
			{
				value: "广发银行",
				text: "广发银行"
			},
			{
				value: "平安银行",
				text: "平安银行"
			},
			{
				value: "北京银行",
				text: "北京银行"
			},
			{
				value: "华夏银行",
				text: "华夏银行"
			},
			{
				value: "农业银行",
				text: "农业银行"
			},
			{
				value: "建设银行",
				text: "建设银行"
			},
			{
				value: "邮政储蓄银行",
				text: "邮政储蓄银行"
			},
			{
				value: "中国银行",
				text: "中国银行"
			},
			{
				value: "宁波银行",
				text: "宁波银行"
			},
			{
				value: "上海银行",
				text: "上海银行"
			},
			{
				value: "南京银行",
				text: "南京银行"
			},
			{
				value: "天津银行",
				text: "天津银行"
			},
			{
				value: "浙商银行",
				text: "浙商银行"
			},
			{
				value: "渤海银行",
				text: "渤海银行"
			},
			{
				value: "恒丰银行",
				text: "恒丰银行"
			},
			{
				value: "齐鲁银行",
				text: "齐鲁银行"
			},
			{
				value: "徽商银行",
				text: "徽商银行"
			},
			{
				value: "苏州银行",
				text: "苏州银行"
			},
			{
				value: "杭州银行",
				text: "杭州银行"
			},
			{
				value: "广州银行",
				text: "广州银行"
			},
			{
				value: "重庆银行",
				text: "重庆银行"
			},
			{
				value: "成都银行",
				text: "成都银行"
			},
			{
				value: "东莞银行",
				text: "东莞银行"
			},
			{
				value: "长沙银行",
				text: "长沙银行"
			},
			{
				value: "武汉银行",
				text: "武汉银行"
			},
			{
				value: "郑州银行",
				text: "郑州银行"
			},
			{
				value: "青岛银行",
				text: "青岛银行"
			},
			{
				value: "大连银行",
				text: "大连银行"
			},
			{
				value: "福州银行",
				text: "福州银行"
			},
			{
				value: "西安银行",
				text: "西安银行"
			},
			{
				value: "哈尔滨银行",
				text: "哈尔滨银行"
			},
			{
				value: "昆明银行",
				text: "昆明银行"
			},
			{
				value: "贵阳银行",
				text: "贵阳银行"
			},
			{
				value: "兰州银行",
				text: "兰州银行"
			},
			{
				value: "石家庄银行",
				text: "石家庄银行"
			},
			{
				value: "长春农商银行",
				text: "长春农商银行"
			},
			{
				value: "吉林银行",
				text: "吉林银行"
			},
			{
				value: "盛京银行",
				text: "盛京银行"
			},
			{
				value: "龙江银行",
				text: "龙江银行"
			},
			{
				value: "温州银行",
				text: "温州银行"
			},
			{
				value: "泉州银行",
				text: "泉州银行"
			},
			{
				value: "济宁银行",
				text: "济宁银行"
			},
			{
				value: "烟台银行",
				text: "烟台银行"
			},
			{
				value: "潍坊银行",
				text: "潍坊银行"
			},
			{
				value: "泰州银行",
				text: "泰州银行"
			},
			{
				value: "南通银行",
				text: "南通银行"
			},
			{
				value: "绍兴银行",
				text: "绍兴银行"
			},
			{
				value: "嘉兴银行",
				text: "嘉兴银行"
			},
			{
				value: "湖州银行",
				text: "湖州银行"
			},
			{
				value: "台州银行",
				text: "台州银行"
			},
			{
				value: "丽水银行",
				text: "丽水银行"
			},
			{
				value: "衢州银行",
				text: "衢州银行"
			},
			{
				value: "舟山银行",
				text: "舟山银行"
			},
			{
				value: "金华银行",
				text: "金华银行"
			},
			{
				value: "义乌稠州商业银行",
				text: "义乌稠州商业银行"
			},
			{
				value: "常熟农商银行",
				text: "常熟农商银行"
			},
			{
				value: "张家港农商银行",
				text: "张家港农商银行"
			},
			{
				value: "江阴农商银行",
				text: "江阴农商银行"
			},
			{
				value: "昆山农商银行",
				text: "昆山农商银行"
			},
			{
				value: "太仓农商银行",
				text: "太仓农商银行"
			},
			{
				value: "吴江农商银行",
				text: "吴江农商银行"
			},
			{
				value: "常州农商银行",
				text: "常州农商银行"
			},
			{
				value: "无锡农商银行",
				text: "无锡农商银行"
			},
			{
				value: "宜兴农商银行",
				text: "宜兴农商银行"
			},
			{
				value: "海安农商银行",
				text: "海安农商银行"
			},
			{
				value: "如东农商银行",
				text: "如东农商银行"
			},
			{
				value: "启东农商银行",
				text: "启东农商银行"
			},
			{
				value: "通州农商银行",
				text: "通州农商银行"
			}
		],
		addressstr: '',
		reason: '', //拒绝原因
		onnode: {}, //计算规则
		istype: true, //是否是身份朕

	})
	let imgobj = ref({
		contact_id_doc_copy: '',
		contact_id_doc_copy_back: '',
		business_authorization_letter: '',
		license_copy: '',
		authorize_letter_copy: '',
		id_card_copy: '',
		id_card_national: '',
		id_card_copys: '',
		id_doc_copy_back: '',
		id_doc_copy_backs: '',
		ubo_id_doc_copy: [],
		ubo_id_doc_copy_back: [],
		qualifications: '',
		legal_person_commitment: '',
		legal_person_video: '',
		business_addition_pics: [],
		pics: '',
	})

	let checked = ref(true)

	onLoad((option) => {
		console.log('位置')
		// uni.getLocation({
		// 	type: 'wgs84',
		// 	geocode: true,
		// 	success: function(res) {
		// 		data.form.longitude = res.longitude
		// 		data.form.latitude = res.latitude
		// 	},
		// 	fail: function(err) {
		// 		console.log('fail：' + JSON.stringify(err));
		// 	}
		// });
		console.log('1111')
		data.state = 0
		getobjdata() //获取草稿
    changecode(1)
	})
	onShow(() => {
		console.log('2222')
		data.settlementarr = settlement()

		data.bankarrcode = bankcode()

		// data.state = 1
		// getopenid() 暂时用不了

		console.log(data.settlementarr, "data.settlementarr")
	})
	onPullDownRefresh(() => {
		setTimeout(function() {
			uni.stopPullDownRefresh();
		}, 1000);
	})
	onReachBottom(() => {
		console.log('onReachBottom')
	})

	function changecode(e) { //商家分类选择
		txdata.value.shop_code = e
		txdata.value.shop_class_id = ''
		shopClassList()
	}

	function addresschange(value) { //地址选择
		data.address = value;
		data.addressstr = value.province + value.city + value.area + value.street
		txdata.value.province = value.province
		txdata.value.city = value.city
		txdata.value.area = value.area
		txdata.value.street = value.street
    uni.request({ //地址换经纬度

      url: `https://restapi.amap.com/v3/geocode/geo?address=${data.addressstr }&key=3e2ed72107f91ba0e8a4f25e297eba78`,
      method: "GET",
      success(res) {
        if (res.data.status == 1) {
          const addressarr = res.data.geocodes[0].location.split(",");
          txdata.value.latitude = Number(addressarr[1])
          txdata.value.longitude = Number(addressarr[0])
          handelshowMap()


        } else {
          uni.showToast({
            icon: "none",
            title: '请填写地址信息'
          })
        }
      },
    });
	}
  const handelshowMap = () => {
    if (!data.address) {
      uni.showToast({
        title: '请先选择省市区',
        icon: 'none'
      })
      return
    }


    uni.chooseLocation({
      latitude:  txdata.value.latitude,
      longitude:  txdata.value.longitude,
      success: function(res) {
        // console.log('chooseLocation', res);
        // console.log('位置名称：' + res.name);
        // console.log('详细地址：' + res.address);
        // console.log('纬度：' + res.latitude);
        // console.log('经度：' + res.longitude);
        txdata.value.longitude = res.longitude
        txdata.value.latitude = res.latitude

      },
      fail() {
        txdata.value.longitude = ''
        txdata.value.latitude = ''

        lcwAddressRef.value.reset()
      }

    })


  }
	function changeshopClass(e) {
		txdata.value.shop_class_id = e
	}

	function shopClassList() { //获取分类
		proxy.$request({
			url: `api/shopClassList/?page=1&size=999&code=${txdata.value.shop_code}`,
			method: 'get',
			success(res) {
				data.shopClassList = res.data.data.map(item => {
					return {
						value: item.ID,
						text: item.name
					}
				})
			}
		})
	}
	//获取草稿
	function getobjdata() {
		proxy.$request({
			url: `api/businessMerchantApply/`,
			method: 'GET',
			success(res) {
				console.log(res, "申请")
				getapplay() //查询是否申请成功
				if (res.data.business_info) {
					txdata.value = JSON.parse(res.data.business_info)
					console.log(txdata.value, "申请")
					imgobj.value = txdata.value.img_info ? JSON.parse(txdata.value.img_info) : {}
					shopClassList()
					data.address.province = txdata.value.province
					data.address.city = txdata.value.city
					data.address.area = txdata.value.area
					data.address.address = txdata.value.address
					//计算规则
					data.settlement = txdata.value.settlement_info.settlement_id
					//选择的银行
					data.account_bank = txdata.value.bank_account_info.bank_address_code

					data.state = 1


				} else {
					data.state = 1
				}

			}
		})


	}
	//查询是否申请成功
	function getapplay() {
		proxy.$request({ //申请
			url: `api/applymentQuery/`,
			method: 'GET',
			success(res) {
				console.log(res, "查询是否申请成功")
				if (res.errno == 0) {
					if (res.data.applyment_state) {
						data.state = 5
						data.errdata = true
						if (res.data.applyment_state == 'APPLYMENT_STATE_EDITTING') {
							data.applyment = '编辑中'
							data.reason = '提交申请发生错误导致，请尝试重新提交'
							data.reback = true
						} else if (res.data.applyment_state == 'APPLYMENT_STATE_AUDITING') {
							data.applyment = '审核中'
							data.reason = '申请单正在审核中，超级管理员用微信打开“签约链接”，完成绑定微信号后，申请单进度将通过微信公众号通知超级管理员，引导完成后续步骤。'
							data.reback = false
						} else if (res.data.applyment_state == 'APPLYMENT_STATE_REJECTED') {
							data.applyment = '已驳回'
							data.reason = '请按照驳回原因修改申请资料，超级管理员用微信打开“签约链接”，完成绑定微信号，后续申请单进度将通过微信公众号通知超级管理员。'
							data.reback = true
						} else if (res.data.applyment_state == 'APPLYMENT_STATE_TO_BE_CONFIRMED') {
							data.applyment = '待账户验证'
							data.reason = '请超级管理员使用微信打开返回的“签约链接”，根据页面指引完成账户验证。'
							data.reback = false
						} else if (res.data.applyment_state == 'APPLYMENT_STATE_TO_BE_SIGNED') {
							data.applyment = '待签约'
							data.reason = '请超级管理员使用微信打开返回的“签约链接”，根据页面指引完成签约。'
							data.codeShow = true
							data.reback = false
						} else if (res.data.applyment_state == 'APPLYMENT_STATE_SIGNING') {
							data.applyment = '待签约'
							data.reason = '系统开通相关权限中，请耐心等待。'
							data.reback = false
							data.codeShow = true
						} else if (res.data.applyment_state == 'APPLYMENT_STATE_FINISHED') {
							data.applyment = '已完成'
							data.reason = '商户入驻申请已完成。'
							data.reback = false
						} else if (res.data.applyment_state == 'APPLYMENT_STATE_CANCELED') {
							data.applyment = '已作废'
							data.reason = '申请单已被撤销。'
							data.reback = true
						}
						data.applyment_state_msg = res.data.applyment_state_msg
						data.sign_url = res.data.sign_url
					}


					console.log(data.sign_url, "data.sign_url")

				}


			}
		})
	}

	function paintersuccess(e) {
		data.tempFilePath = e
	}

	function capture() {
		// #ifdef APP-PLUS
		uni.saveImageToPhotosAlbum({
			filePath: data.tempFilePath,
			success() {
				uni.showToast({
					position: "center",
					icon: "none",
					title: "图片保存成功，请到手机相册查看"
				})
			},
			fail(e) {
				uni.showModal({
					content: "保存相册失败，errCode：" + e.errCode + "，errMsg：" + e.errMsg + "，errSubject：" + e
						.errSubject,
					showCancel: false
				});
			}
		})
		// #endif
		// #ifndef APP-PLUS
		savePicture(data.tempFilePath)
		// #endif
	}
	//获取openid
	function getopenid() {
		proxy.$request({ //申请
			url: `api/openid/`,
			method: 'GET',
			success(res) {
				console.log(res, "openuid")

			}
		})
	}
	//添加受益人
	function addlist() {
		txdata.value.subject_info.ubo_info_list.push({ //最终受益人信息列表(UBO) 仅企业需要填写。
			ubo_id_doc_type: 'IDENTIFICATION_TYPE_IDCARD', //证件类型
			ubo_id_doc_copy: [], //证件正面照片
			ubo_id_doc_copy_back: '', //证件反面照片
			ubo_id_doc_name: '', //证件姓名
			ubo_id_doc_number: '', //证件号码
			ubo_id_doc_address: '', //证件居住地址
			ubo_period_begin: '', //证件有效期开始时间
			ubo_period_end: '', //证件有效期结束时间
		})
	}
	//删除受益人
	function dellist(i) {
		txdata.value.subject_info.ubo_info_list.splice(i, 1)
	}

	function back() {
		uni.switchTab({
			url: '/pages/personal/index'
		})
	}

	function settlement() {
		let data = [{
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "餐饮",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "电商平台",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "零售",
			"required": "false",
			"special": "无需特殊资质，若涉及烟草售卖，需提供《烟草专卖零售许可证》"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "食品生鲜",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "咨询/娱乐票务",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "房产中介",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "宠物医院",
			"required": "true",
			"special": "《动物诊疗许可证》"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "共享服务",
			"required": "true",
			"special": "涉及押金需提供资金监管协议，协议要求："
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "共享服务",
			"required": "true",
			"special": "1、主体与商业银行签订；"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "共享服务",
			"required": "true",
			"special": "2、内容针对交易资金使用和偿付进行监管；"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "共享服务",
			"required": "true",
			"special": "3、协议须在有效期内；"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "共享服务",
			"required": "true",
			"special": "4、结算账户须与资金监管账户一致。"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "共享服务",
			"required": "true",
			"special": "不涉及押金：请提供承诺函"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "共享服务",
			"required": "true",
			"special": "承诺函模板请参考：商户承诺函"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "休闲娱乐/旅游服务",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "游艺厅/KTV",
			"required": "true",
			"special": "《娱乐场所经营许可证》或《文化经营许可证》"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "网吧",
			"required": "true",
			"special": "《网络文化经营许可证》"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "院线影城",
			"required": "true",
			"special": "《电影放映经营许可证》"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "演出赛事",
			"required": "true",
			"special": "《营业性演出许可证》"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "居民生活服务",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "景区/酒店",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "铁路客运",
			"required": "true",
			"special": "收费授权证明文件（如授权证明书或合同）"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "机票/票务代理",
			"required": "true",
			"special": "《航空公司营业执照》或《航空公司机票代理资格证》"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "培训机构",
			"required": "true",
			"special": "1、《办学许可证》或相关批文"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "培训机构",
			"required": "true",
			"special": "2、驾校培训，提供有“驾驶员培训”项目的《道路运输经营许可证》"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "保健器械/医疗器械/非处方药品",
			"required": "true",
			"special": "互联网售药提供《互联网药品信息服务资格证书》+《药品经营许可证》；"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "保健器械/医疗器械/非处方药品",
			"required": "true",
			"special": "线下门店卖药提供《药品经营许可证》；"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "保健器械/医疗器械/非处方药品",
			"required": "true",
			"special": "医疗器械提供《医疗器械经营企业许可证》"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "其他私立/民营医院/诊所",
			"required": "true",
			"special": "《医疗机构执业许可证》"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "其他私立/民营医院/诊所",
			"required": "true",
			"special": "中医诊所提供《中医诊所备案证》"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "其他缴费",
			"required": "true",
			"special": "收费授权证明文件（如授权证明书或合同）"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "停车缴费",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 719,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1",
			"text": "私立/民营口腔及眼科、医疗美容医院/诊所",
			"required": "true",
			"special": "请提供医疗机构执业资质，诊疗科目包含口腔、眼科、医疗美容等"
		}, {
			"value": 720,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1，虚拟限额",
			"text": "婚介平台/就业信息平台/其他信息服务平台",
			"required": "true",
			"special": "就业信息平台需提供《人力资源许可证》；婚介平台/其他信息平台服务可直接提供主体执照。"
		}, {
			"value": 720,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1，虚拟限额",
			"text": "虚拟充值",
			"required": "true",
			"special": "1）自营虚拟充值业务：提供相关自营资质、与主体一致的资金监管协议等；"
		}, {
			"value": 720,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1，虚拟限额",
			"text": "虚拟充值",
			"required": "true",
			"special": "2）他营虚拟充值业务：官方授权及合作证明以及官方所持有的自营资质、与主体一致的收费证明及资金监管协议等；"
		}, {
			"value": 720,
			"type": "个体户",
			"description": "费率0.6%,入账周期T+1，虚拟限额",
			"text": "虚拟充值",
			"required": "true",
			"special": "3）如涉及到电信运营商、宽带收费等线上充值业务，请提供《基础电信业务经营许可证》或《增值电信业务经营许可证》；"
		}, {
			"value": 721,
			"type": "个体户",
			"description": "费率0.3%,入账周期T+1",
			"text": "快递",
			"required": "true",
			"special": "快递《快递业务经营许可证》"
		}, {
			"value": 721,
			"type": "个体户",
			"description": "费率0.3%,入账周期T+1",
			"text": "物流",
			"required": "true",
			"special": "物流《道路运输经营许可证》；从事网络货运的，提供以下三个资质《增值电信业务许可证》《三级信息系统安全等级保护备案证明》《道路运输经营许可证》；"
		}, {
			"value": 721,
			"type": "个体户",
			"description": "费率0.3%,入账周期T+1",
			"text": "加油/加气",
			"required": "true",
			"special": "成品油零售请提供《成品油批发经营批准证书》或《成品油仓储经营批准证书》或《成品油零售经营批准证书》，其中一个即可。"
		}, {
			"value": 721,
			"type": "个体户",
			"description": "费率0.3%,入账周期T+1",
			"text": "加油/加气",
			"required": "true",
			"special": "成品油批发或仓储则需传经营范围含有“成品油批发”或“成品油仓储”字样的营业执照；"
		}, {
			"value": 721,
			"type": "个体户",
			"description": "费率0.3%,入账周期T+1",
			"text": "加油/加气",
			"required": "true",
			"special": "汽车加气站请提供《燃气经营许可证》，证件经营类别为“燃气汽车加气站”等字样"
		}, {
			"value": 790,
			"type": "个体户",
			"description": "费率0.2%，入账周期T+1",
			"text": "水电煤气缴费",
			"required": "true",
			"special": "收费授权证明文件（如授权证明书或合同）"
		}, {
			"value": 746,
			"type": "个体户",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "在线图书/视频/音乐",
			"required": "true",
			"special": "普通在线图书/视频/音乐应提供以下任选其一资质：《互联网出版许可证》、《网络出版服务许可证》、《网络文化经营许可证》、《信息网络传播视听节目许可证》；"
		}, {
			"value": 746,
			"type": "个体户",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "在线图书/视频/音乐",
			"required": "true",
			"special": "如属于微短剧，应提供以下任一资质："
		}, {
			"value": 746,
			"type": "个体户",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "在线图书/视频/音乐",
			"required": "true",
			"special": "（1）《信息网络传播视听节目许可证》或《信息网络传播视听节目备案》（业务类别均需含“网络剧（片）的制作、播出服务”）；"
		}, {
			"value": 746,
			"type": "个体户",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "在线图书/视频/音乐",
			"required": "true",
			"special": "（2）同时提供："
		}, {
			"value": 746,
			"type": "个体户",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "在线图书/视频/音乐",
			"required": "true",
			"special": "①《信息网络传播视听节目许可证》或《信息网络传播视听节目备案》"
		}, {
			"value": 746,
			"type": "个体户",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "在线图书/视频/音乐",
			"required": "true",
			"special": "②《广播电视播出机构许可证》"
		}, {
			"value": 746,
			"type": "个体户",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "在线图书/视频/音乐",
			"required": "true",
			"special": "（3）同时提供："
		}, {
			"value": 746,
			"type": "个体户",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "在线图书/视频/音乐",
			"required": "true",
			"special": "①《信息网络传播视听节目许可证》或《信息网络传播视听节目备案》"
		}, {
			"value": 746,
			"type": "个体户",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "在线图书/视频/音乐",
			"required": "true",
			"special": "②《广播电视节目制作经营许可证》。"
		}, {
			"value": 746,
			"type": "个体户",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "门户论坛/网络广告及推广/软件开发/其他互联网服务",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 746,
			"type": "个体户",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "游戏",
			"required": "true",
			"special": "请提供有效期内的游戏版号（《网络游戏电子出版物审批》）。若游戏涉及IP合作，请确保已获得合法有效授权。"
		}, {
			"value": 746,
			"type": "个体户",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "网络直播/直播平台",
			"required": "true",
			"special": "需提供《网络文化经营许可证》，且许可证的经营场景应当明确包括网络表演，PC/wap网站需要有ICP备案"
		}, {
			"value": 903,
			"type": "个体户",
			"description": "非信用卡0.6%，信用卡0.6%，入账周期T+1",
			"text": "美妆日化",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 903,
			"type": "个体户",
			"description": "非信用卡0.6%，信用卡0.6%，入账周期T+1",
			"text": "健身运动服务",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "电商平台",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "零售",
			"required": "false",
			"special": "无需特殊资质，若涉及烟草售卖，需提供《烟草专卖零售许可证》"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "食品生鲜",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "咨询/娱乐票务",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "房地产",
			"required": "true",
			"special": "房地产开发商提供以下五个资质：《建设用地规划许可证》《建设工程规划许可证》《建筑工程施工许可证》《国有土地使用证》《商品房预售许可证》；"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "房产中介",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "宠物医院",
			"required": "true",
			"special": "《动物诊疗许可证》"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "共享服务",
			"required": "true",
			"special": "涉及押金需提供资金监管协议，协议要求："
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "共享服务",
			"required": "true",
			"special": "1、主体与商业银行签订；"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "共享服务",
			"required": "true",
			"special": "2、内容针对交易资金使用和偿付进行监管；"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "共享服务",
			"required": "true",
			"special": "3、协议须在有效期内；"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "共享服务",
			"required": "true",
			"special": "4、结算账户须与资金监管账户一致。"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "共享服务",
			"required": "true",
			"special": "不涉及押金：请提供承诺函"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "共享服务",
			"required": "true",
			"special": "承诺函模板请参考：商户承诺函"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "休闲娱乐/旅游服务",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "游艺厅/KTV",
			"required": "true",
			"special": "《娱乐场所经营许可证》或《文化经营许可证》"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "网吧",
			"required": "true",
			"special": "《网络文化经营许可证》"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "院线影城",
			"required": "true",
			"special": "《电影放映经营许可证》"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "演出赛事",
			"required": "true",
			"special": "《营业性演出许可证》"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "居民生活服务",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "景区/酒店",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "铁路客运",
			"required": "true",
			"special": "收费授权证明文件（如授权证明书或合同）"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "高速公路收费",
			"required": "true",
			"special": "收费授权证明文件（如授权证明书或合同）"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "城市公共交通",
			"required": "true",
			"special": "收费授权证明文件（如授权证明书或合同）"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "船舶/海运服务",
			"required": "true",
			"special": "《港口经营许可证》"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "旅行社",
			"required": "true",
			"special": "《旅行社业务经营许可证》"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "机票/票务代理",
			"required": "true",
			"special": "《航空公司营业执照》或《航空公司机票代理资格证》"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "培训机构",
			"required": "true",
			"special": "1、《办学许可证》或相关批文"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "培训机构",
			"required": "true",
			"special": "2、驾校培训，提供有“驾驶员培训”项目的《道路运输经营许可证》"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "保健器械/医疗器械/非处方药品",
			"required": "true",
			"special": "互联网售药提供《互联网药品信息服务资格证书》+《药品经营许可证》；"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "保健器械/医疗器械/非处方药品",
			"required": "true",
			"special": "线下门店卖药提供《药品经营许可证》；"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "保健器械/医疗器械/非处方药品",
			"required": "true",
			"special": "医疗器械提供《医疗器械经营企业许可证》"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "其他私立/民营医院/诊所",
			"required": "true",
			"special": "《医疗机构执业许可证》"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "其他私立/民营医院/诊所",
			"required": "true",
			"special": "中医诊所提供《中医诊所备案证》"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "有线电视缴费",
			"required": "true",
			"special": "收费授权证明文件（如授权证明书或合同）"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "其他缴费",
			"required": "true",
			"special": "收费授权证明文件（如授权证明书或合同）"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "其他缴费",
			"required": "true",
			"special": "拍卖：《拍卖经营批准证书》"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "文物经营/文物复制品销售",
			"required": "true",
			"special": "销售文物，需提供《文物经营许可证》。"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "文物经营/文物复制品销售",
			"required": "true",
			"special": "仅销售文物复制品的，可直接提供主体执照。"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "停车缴费",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 716,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "私立/民营口腔及眼科、医疗美容医院/诊所",
			"required": "true",
			"special": "请提供医疗机构执业资质，诊疗科目包含口腔、眼科、医疗美容等"
		}, {
			"value": 715,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1",
			"text": "保险业务",
			"required": "true",
			"special": "保险公司提供《经营保险业务许可证》《保险业务法人登记证书》，其他公司提供相关资质"
		}, {
			"value": 807,
			"type": "企业",
			"description": "费率0.6%，入账周期T+1",
			"text": "典当",
			"required": "true",
			"special": "典当：《典当经营许可证》"
		}, {
			"value": 728,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1，虚拟限额",
			"text": "婚介平台/就业信息平台/其他信息服务平台",
			"required": "true",
			"special": "就业信息平台需提供《人力资源许可证》；婚介平台/其他信息平台服务可直接提供主体执照。"
		}, {
			"value": 728,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1，虚拟限额",
			"text": "虚拟充值",
			"required": "true",
			"special": "1）自营虚拟充值业务：提供相关自营资质、与主体一致的资金监管协议等；"
		}, {
			"value": 728,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1，虚拟限额",
			"text": "虚拟充值",
			"required": "true",
			"special": "2）他营虚拟充值业务：官方授权及合作证明以及官方所持有的自营资质、与主体一致的收费证明及资金监管协议等；"
		}, {
			"value": 728,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1，虚拟限额",
			"text": "虚拟充值",
			"required": "true",
			"special": "3）如涉及到电信运营商、宽带收费等线上充值业务，请提供《基础电信业务经营许可证》或《增值电信业务经营许可证》；"
		}, {
			"value": 728,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1，虚拟限额",
			"text": "财经/股票类资讯",
			"required": "true",
			"special": "若有具体的荐股行为，需提供《经营证券期货业务许可证》。如所经营业务无须行政许可的，可直接提供主体执照。"
		}, {
			"value": 728,
			"type": "企业",
			"description": "费率0.6%,入账周期T+1，虚拟限额",
			"text": "互联网募捐信息平台",
			"required": "true",
			"special": "必须符合并提供“慈善组织互联网募捐信息平台公告”截图，且必须提供资金监管协议。"
		}, {
			"value": 711,
			"type": "企业",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "在线图书/视频/音乐",
			"required": "true",
			"special": "普通在线图书/视频/音乐应提供以下任选其一资质：《互联网出版许可证》、《网络出版服务许可证》、《网络文化经营许可证》、《信息网络传播视听节目许可证》；"
		}, {
			"value": 711,
			"type": "企业",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "在线图书/视频/音乐",
			"required": "true",
			"special": "如属于微短剧，应提供以下任一资质："
		}, {
			"value": 711,
			"type": "企业",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "在线图书/视频/音乐",
			"required": "true",
			"special": "（1）《信息网络传播视听节目许可证》或《信息网络传播视听节目备案》（业务类别均需含“网络剧（片）的制作、播出服务”）；"
		}, {
			"value": 711,
			"type": "企业",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "在线图书/视频/音乐",
			"required": "true",
			"special": "（2）同时提供："
		}, {
			"value": 711,
			"type": "企业",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "在线图书/视频/音乐",
			"required": "true",
			"special": "①《信息网络传播视听节目许可证》或《信息网络传播视听节目备案》"
		}, {
			"value": 711,
			"type": "企业",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "在线图书/视频/音乐",
			"required": "true",
			"special": "②《广播电视播出机构许可证》"
		}, {
			"value": 711,
			"type": "企业",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "在线图书/视频/音乐",
			"required": "true",
			"special": "（3）同时提供："
		}, {
			"value": 711,
			"type": "企业",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "在线图书/视频/音乐",
			"required": "true",
			"special": "①《信息网络传播视听节目许可证》或《信息网络传播视听节目备案》"
		}, {
			"value": 711,
			"type": "企业",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "在线图书/视频/音乐",
			"required": "true",
			"special": "②《广播电视节目制作经营许可证》"
		}, {
			"value": 711,
			"type": "企业",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "门户论坛/网络广告及推广/软件开发/其他互联网服务",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 711,
			"type": "企业",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "游戏",
			"required": "true",
			"special": "请提供有效期内的游戏版号（《网络游戏电子出版物审批》）。若游戏涉及IP合作，请确保已获得合法有效授权。"
		}, {
			"value": 711,
			"type": "企业",
			"description": "费率1%,入账周期T+1，虚拟限额",
			"text": "网络直播/直播平台",
			"required": "true",
			"special": "需提供《网络文化经营许可证》，且许可证的经营范围应当明确包括网络表演，PC/wap网站需要有ICP备案"
		}, {
			"value": 717,
			"type": "企业",
			"description": "费率0.3%,入账周期T+1",
			"text": "快递",
			"required": "true",
			"special": "快递《快递业务经营许可证》"
		}, {
			"value": 717,
			"type": "企业",
			"description": "费率0.3%,入账周期T+1",
			"text": "物流",
			"required": "true",
			"special": "物流《道路运输经营许可证》；从事网络货运的，提供以下三个资质《增值电信业务许可证》《三级信息系统安全等级保护备案证明》《道路运输经营许可证》；"
		}, {
			"value": 717,
			"type": "企业",
			"description": "费率0.3%,入账周期T+1",
			"text": "加油/加气",
			"required": "true",
			"special": "成品油零售请提供《成品油批发经营批准证书》或《成品油仓储经营批准证书》或《成品油零售经营批准证书》，其中一个即可。"
		}, {
			"value": 717,
			"type": "企业",
			"description": "费率0.3%,入账周期T+1",
			"text": "加油/加气",
			"required": "true",
			"special": "成品油批发或仓储则需传经营范围含有“成品油批发”或“成品油仓储”字样的营业执照；"
		}, {
			"value": 717,
			"type": "企业",
			"description": "费率0.3%,入账周期T+1",
			"text": "加油/加气",
			"required": "true",
			"special": "汽车加气站请提供《燃气经营许可证》，证件经营类别为“燃气汽车加气站”等字样"
		}, {
			"value": 717,
			"type": "企业",
			"description": "费率0.3%,入账周期T+1",
			"text": "民办学校（非全国高等学校）",
			"required": "true",
			"special": "民办非公立院校需提供《办学许可证》"
		}, {
			"value": 730,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1",
			"text": "水电煤气缴费",
			"required": "true",
			"special": "收费授权证明文件（如授权证明书或合同）"
		}, {
			"value": 808,
			"type": "企业",
			"description": "费率0.2%，入账周期T+1，禁信用卡",
			"text": "银行还款",
			"required": "true",
			"special": "1、银行业提供银监会颁发的：《金融许可证》；"
		}, {
			"value": 808,
			"type": "企业",
			"description": "费率0.2%，入账周期T+1，禁信用卡",
			"text": "银行还款",
			"required": "true",
			"special": "2、提供盖章版本的补充说明，模板参考：请【点击这里】"
		}, {
			"value": 718,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1，禁信用卡",
			"text": "信用还款",
			"required": "true",
			"special": "【消费金融】：《营业执照》公司名称含“消费金融”提交以下任一资料："
		}, {
			"value": 718,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1，禁信用卡",
			"text": "信用还款",
			"required": "true",
			"special": "1、《金融许可证》；"
		}, {
			"value": 718,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1，禁信用卡",
			"text": "信用还款",
			"required": "true",
			"special": "2、开业期地方银保监局批复文件。"
		}, {
			"value": 718,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1，禁信用卡",
			"text": "信用还款",
			"required": "true",
			"special": "【汽车金融】：《营业执照》公司名称含“汽车金融”提交以下任一资料："
		}, {
			"value": 718,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1，禁信用卡",
			"text": "信用还款",
			"required": "true",
			"special": "1、《金融许可证》；"
		}, {
			"value": 718,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1，禁信用卡",
			"text": "信用还款",
			"required": "true",
			"special": "2、银保监会关于同意开展汽车金融业务的批复。"
		}, {
			"value": 718,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1，禁信用卡",
			"text": "信用还款",
			"required": "true",
			"special": "【小额贷款】：《营业执照》公司名称含“小额贷款”提交以下任一资料："
		}, {
			"value": 718,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1，禁信用卡",
			"text": "信用还款",
			"required": "true",
			"special": "1、《小额贷款公司经营许可证》；"
		}, {
			"value": 718,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1，禁信用卡",
			"text": "信用还款",
			"required": "true",
			"special": "2、地方金融监督管理局“小额贷款”行政许可文件。"
		}, {
			"value": 718,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1，禁信用卡",
			"text": "信用还款",
			"required": "true",
			"special": "【商业保理】：《营业执照》公司名称含“商业保理”，提交以下任一资料："
		}, {
			"value": 718,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1，禁信用卡",
			"text": "信用还款",
			"required": "true",
			"special": "1、《商业保理经营许可证》；"
		}, {
			"value": 718,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1，禁信用卡",
			"text": "信用还款",
			"required": "true",
			"special": "2、地方金融监督管理局批复文件。"
		}, {
			"value": 718,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1，禁信用卡",
			"text": "信用还款",
			"required": "true",
			"special": "【融资租赁（实物类）】：《营业执照》公司名称含“融资租赁”，请提供“全国融资租赁企业管理信息系统”备案截图。"
		}, {
			"value": 718,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1，禁信用卡",
			"text": "信用还款",
			"required": "true",
			"special": "【信托】：《营业执照》公司名称含“信托”，提交以下任一资料："
		}, {
			"value": 718,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1，禁信用卡",
			"text": "信用还款",
			"required": "true",
			"special": "1、《金融许可证》；"
		}, {
			"value": 718,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1，禁信用卡",
			"text": "信用还款",
			"required": "true",
			"special": "2、中国银保监会“信托”批复文件。"
		}, {
			"value": 718,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1，禁信用卡",
			"text": "信用还款",
			"required": "true",
			"special": "【融资担保】：《营业执照》公司名称含“融资担保”，提交以下任一资料："
		}, {
			"value": 718,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1，禁信用卡",
			"text": "信用还款",
			"required": "true",
			"special": "1、《融资性担保机构经营许可证》；"
		}, {
			"value": 718,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1，禁信用卡",
			"text": "信用还款",
			"required": "true",
			"special": "2、《融资担保业务经营许可证》；"
		}, {
			"value": 718,
			"type": "企业",
			"description": "费率0.2%,入账周期T+1，禁信用卡",
			"text": "信用还款",
			"required": "true",
			"special": "3、地方金融监督管理局批复文件。"
		}, {
			"value": 739,
			"type": "企业",
			"description": "费率0%,入账周期T+1",
			"text": "民办大学及院校",
			"required": "true",
			"special": "民办非公立院校需提供《办学许可证》"
		}, {
			"value": 739,
			"type": "企业",
			"description": "费率0%,入账周期T+1",
			"text": "党费",
			"required": "true",
			"special": "1、党费专户开户许可证或结算账户申请书或银行提供的专户证明"
		}, {
			"value": 739,
			"type": "企业",
			"description": "费率0%,入账周期T+1",
			"text": "党费",
			"required": "true",
			"special": "2、党委成立文件/党委书记任命文件"
		}, {
			"value": 904,
			"type": "企业",
			"description": "非信用卡0.6%，信用卡0.6%，入账周期T+1",
			"text": "服饰鞋包",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 904,
			"type": "企业",
			"description": "非信用卡0.6%，信用卡0.6%，入账周期T+1",
			"text": "美妆日化",
			"required": "false",
			"special": "无需特殊资质"
		}, {
			"value": 904,
			"type": "企业",
			"description": "非信用卡0.6%，信用卡0.6%，入账周期T+1",
			"text": "健身运动服务",
			"required": "false",
			"special": "无需特殊资质"
		}]
		// // 创建一个空对象来存储分类后的数据
		// const categorizedData = {};

		// // 遍历数据并按 type 分类
		// data.forEach(item => {
		// 	if (!categorizedData[item.type]) {
		// 		categorizedData[item.type] = [];
		// 	}
		// 	categorizedData[item.type].push(item);
		// });

		// // 将结果转换为数组形式
		// const result = Object.entries(categorizedData).map(([text, children]) => ({
		// 	text,
		// 	children
		// }));
		// result[0].value = 0
		// result[1].value = 1


		//以下为现在的
		const result = [];
		const provinceMap = {};
		data.forEach(item => {
			const {
				value,
				type,
				description,
				text,
				required,
				special
			} = item;
			if (!provinceMap[type]) {
				provinceMap[type] = {
					text: type,
					value: `${value}-0`,
					children: []
				};
				result.push(provinceMap[type]);
			}
			provinceMap[type].children.push({
				text: text,
				value: `${value}`,
				description: description,
				required: required,
				special: special
			});
		});
		// // 创建一个Set来跟踪已经存在的text值

		result.forEach((item) => {
			const seenTexts = new Set();
			// 过滤掉重复的children项
			item.children = item.children.filter(child => {
				if (seenTexts.has(child.text)) {
					return false; // 如果text已经存在，则过滤掉该项
				} else {
					seenTexts.add(child.text); // 否则将text添加到Set中
					return true; // 保留该项
				}
			});
		})

		return result



	}

	function bankcode() {
		let data = [{
				id: 130100,
				province: '河北省',
				city: '石家庄市'
			},
			{
				id: 130200,
				province: '河北省',
				city: '唐山市'
			},
			{
				id: 130300,
				province: '河北省',
				city: '秦皇岛市'
			},
			{
				id: 130400,
				province: '河北省',
				city: '邯郸市'
			},
			{
				id: 130500,
				province: '河北省',
				city: '邢台市'
			},
			{
				id: 130600,
				province: '河北省',
				city: '保定市'
			},
			{
				id: 130700,
				province: '河北省',
				city: '张家口市'
			},
			{
				id: 130800,
				province: '河北省',
				city: '承德市'
			},
			{
				id: 130900,
				province: '河北省',
				city: '沧州市'
			},
			{
				id: 131000,
				province: '河北省',
				city: '廊坊市'
			},
			{
				id: 131100,
				province: '河北省',
				city: '衡水市'
			},
			{
				id: 140100,
				province: '山西省',
				city: '太原市'
			},
			{
				id: 140200,
				province: '山西省',
				city: '大同市'
			},
			{
				id: 140300,
				province: '山西省',
				city: '阳泉市'
			},
			{
				id: 140400,
				province: '山西省',
				city: '长治市'
			},
			{
				id: 140500,
				province: '山西省',
				city: '晋城市'
			},
			{
				id: 140600,
				province: '山西省',
				city: '朔州市'
			},
			{
				id: 140700,
				province: '山西省',
				city: '晋中市'
			},
			{
				id: 140800,
				province: '山西省',
				city: '运城市'
			},
			{
				id: 140900,
				province: '山西省',
				city: '忻州市'
			},
			{
				id: 141000,
				province: '山西省',
				city: '临汾市'
			},
			{
				id: 141100,
				province: '山西省',
				city: '吕梁市'
			},
			{
				id: 150100,
				province: '内蒙古自治区',
				city: '呼和浩特市'
			},
			{
				id: 150200,
				province: '内蒙古自治区',
				city: '包头市'
			},
			{
				id: 150300,
				province: '内蒙古自治区',
				city: '乌海市'
			},
			{
				id: 150400,
				province: '内蒙古自治区',
				city: '赤峰市'
			},
			{
				id: 150500,
				province: '内蒙古自治区',
				city: '通辽市'
			},
			{
				id: 150600,
				province: '内蒙古自治区',
				city: '鄂尔多斯市'
			},
			{
				id: 150700,
				province: '内蒙古自治区',
				city: '呼伦贝尔市'
			},
			{
				id: 150800,
				province: '内蒙古自治区',
				city: '巴彦淖尔市'
			},
			{
				id: 150900,
				province: '内蒙古自治区',
				city: '乌兰察布市'
			},
			{
				id: 152200,
				province: '内蒙古自治区',
				city: '兴安盟'
			},
			{
				id: 152500,
				province: '内蒙古自治区',
				city: '锡林郭勒盟'
			},
			{
				id: 152900,
				province: '内蒙古自治区',
				city: '阿拉善盟'
			},
			{
				id: 210100,
				province: '辽宁省',
				city: '沈阳市'
			},
			{
				id: 210200,
				province: '辽宁省',
				city: '大连市'
			},
			{
				id: 210300,
				province: '辽宁省',
				city: '鞍山市'
			},
			{
				id: 210400,
				province: '辽宁省',
				city: '抚顺市'
			},
			{
				id: 210500,
				province: '辽宁省',
				city: '本溪市'
			},
			{
				id: 210600,
				province: '辽宁省',
				city: '丹东市'
			},
			{
				id: 210700,
				province: '辽宁省',
				city: '锦州市'
			},
			{
				id: 210800,
				province: '辽宁省',
				city: '营口市'
			},
			{
				id: 210900,
				province: '辽宁省',
				city: '阜新市'
			},
			{
				id: 211000,
				province: '辽宁省',
				city: '辽阳市'
			},
			{
				id: 211100,
				province: '辽宁省',
				city: '盘锦市'
			},
			{
				id: 211200,
				province: '辽宁省',
				city: '铁岭市'
			},
			{
				id: 211300,
				province: '辽宁省',
				city: '朝阳市'
			},
			{
				id: 211400,
				province: '辽宁省',
				city: '葫芦岛市'
			},
			{
				id: 220100,
				province: '吉林省',
				city: '长春市'
			},
			{
				id: 220200,
				province: '吉林省',
				city: '吉林市'
			},
			{
				id: 220300,
				province: '吉林省',
				city: '四平市'
			},
			{
				id: 220400,
				province: '吉林省',
				city: '辽源市'
			},
			{
				id: 220500,
				province: '吉林省',
				city: '通化市'
			},
			{
				id: 220600,
				province: '吉林省',
				city: '白山市'
			},
			{
				id: 220700,
				province: '吉林省',
				city: '松原市'
			},
			{
				id: 220800,
				province: '吉林省',
				city: '白城市'
			},
			{
				id: 222400,
				province: '吉林省',
				city: '延边朝鲜族自治州'
			},
			{
				id: 230100,
				province: '黑龙江省',
				city: '哈尔滨市'
			},
			{
				id: 230200,
				province: '黑龙江省',
				city: '齐齐哈尔市'
			},
			{
				id: 230300,
				province: '黑龙江省',
				city: '鸡西市'
			},
			{
				id: 230400,
				province: '黑龙江省',
				city: '鹤岗市'
			},
			{
				id: 230500,
				province: '黑龙江省',
				city: '双鸭山市'
			},
			{
				id: 230600,
				province: '黑龙江省',
				city: '大庆市'
			},
			{
				id: 230700,
				province: '黑龙江省',
				city: '伊春市'
			},
			{
				id: 230800,
				province: '黑龙江省',
				city: '佳木斯市'
			},
			{
				id: 230900,
				province: '黑龙江省',
				city: '七台河市'
			},
			{
				id: 231000,
				province: '黑龙江省',
				city: '牡丹江市'
			},
			{
				id: 231100,
				province: '黑龙江省',
				city: '黑河市'
			},
			{
				id: 231200,
				province: '黑龙江省',
				city: '绥化市'
			},
			{
				id: 232700,
				province: '黑龙江省',
				city: '大兴安岭地区'
			},
			{
				id: 320100,
				province: '江苏省',
				city: '南京市'
			},
			{
				id: 320200,
				province: '江苏省',
				city: '无锡市'
			},
			{
				id: 320300,
				province: '江苏省',
				city: '徐州市'
			},
			{
				id: 320400,
				province: '江苏省',
				city: '常州市'
			},
			{
				id: 320500,
				province: '江苏省',
				city: '苏州市'
			},
			{
				id: 320600,
				province: '江苏省',
				city: '南通市'
			},
			{
				id: 320700,
				province: '江苏省',
				city: '连云港市'
			},
			{
				id: 320800,
				province: '江苏省',
				city: '淮安市'
			},
			{
				id: 320900,
				province: '江苏省',
				city: '盐城市'
			},
			{
				id: 321000,
				province: '江苏省',
				city: '扬州市'
			},
			{
				id: 321100,
				province: '江苏省',
				city: '镇江市'
			},
			{
				id: 321200,
				province: '江苏省',
				city: '泰州市'
			},
			{
				id: 321300,
				province: '江苏省',
				city: '宿迁市'
			},
			{
				id: 330100,
				province: '浙江省',
				city: '杭州市'
			},
			{
				id: 330200,
				province: '浙江省',
				city: '宁波市'
			},
			{
				id: 330300,
				province: '浙江省',
				city: '温州市'
			},
			{
				id: 330400,
				province: '浙江省',
				city: '嘉兴市'
			},
			{
				id: 330500,
				province: '浙江省',
				city: '湖州市'
			},
			{
				id: 330600,
				province: '浙江省',
				city: '绍兴市'
			},
			{
				id: 330700,
				province: '浙江省',
				city: '金华市'
			},
			{
				id: 330800,
				province: '浙江省',
				city: '衢州市'
			},
			{
				id: 330900,
				province: '浙江省',
				city: '舟山市'
			},
			{
				id: 331000,
				province: '浙江省',
				city: '台州市'
			},
			{
				id: 331100,
				province: '浙江省',
				city: '丽水市'
			},
			{
				id: 340100,
				province: '安徽省',
				city: '合肥市'
			},
			{
				id: 340200,
				province: '安徽省',
				city: '芜湖市'
			},
			{
				id: 340300,
				province: '安徽省',
				city: '蚌埠市'
			},
			{
				id: 340400,
				province: '安徽省',
				city: '淮南市'
			},
			{
				id: 340500,
				province: '安徽省',
				city: '马鞍山市'
			},
			{
				id: 340600,
				province: '安徽省',
				city: '淮北市'
			},
			{
				id: 340700,
				province: '安徽省',
				city: '铜陵市'
			},
			{
				id: 340800,
				province: '安徽省',
				city: '安庆市'
			},
			{
				id: 341000,
				province: '安徽省',
				city: '黄山市'
			},
			{
				id: 341100,
				province: '安徽省',
				city: '滁州市'
			},
			{
				id: 341200,
				province: '安徽省',
				city: '阜阳市'
			},
			{
				id: 341300,
				province: '安徽省',
				city: '宿州市'
			},
			{
				id: 341500,
				province: '安徽省',
				city: '六安市'
			},
			{
				id: 341600,
				province: '安徽省',
				city: '亳州市'
			},
			{
				id: 341700,
				province: '安徽省',
				city: '池州市'
			},
			{
				id: 341800,
				province: '安徽省',
				city: '宣城市'
			},
			{
				id: 350100,
				province: '福建省',
				city: '福州市'
			},
			{
				id: 350200,
				province: '福建省',
				city: '厦门市'
			},
			{
				id: 350300,
				province: '福建省',
				city: '莆田市'
			},
			{
				id: 350400,
				province: '福建省',
				city: '三明市'
			},
			{
				id: 350500,
				province: '福建省',
				city: '泉州市'
			},
			{
				id: 350600,
				province: '福建省',
				city: '漳州市'
			},
			{
				id: 350700,
				province: '福建省',
				city: '南平市'
			},
			{
				id: 350800,
				province: '福建省',
				city: '龙岩市'
			},
			{
				id: 350900,
				province: '福建省',
				city: '宁德市'
			},
			{
				id: 360100,
				province: '江西省',
				city: '南昌市'
			},
			{
				id: 360200,
				province: '江西省',
				city: '景德镇市'
			},
			{
				id: 360300,
				province: '江西省',
				city: '萍乡市'
			},
			{
				id: 360400,
				province: '江西省',
				city: '九江市'
			},
			{
				id: 360500,
				province: '江西省',
				city: '新余市'
			},
			{
				id: 360600,
				province: '江西省',
				city: '鹰潭市'
			},
			{
				id: 360700,
				province: '江西省',
				city: '赣州市'
			},
			{
				id: 360800,
				province: '江西省',
				city: '吉安市'
			},
			{
				id: 360900,
				province: '江西省',
				city: '宜春市'
			},
			{
				id: 361000,
				province: '江西省',
				city: '抚州市'
			},
			{
				id: 361100,
				province: '江西省',
				city: '上饶市'
			},
			{
				id: 370100,
				province: '山东省',
				city: '济南市'
			},
			{
				id: 370200,
				province: '山东省',
				city: '青岛市'
			},
			{
				id: 370300,
				province: '山东省',
				city: '淄博市'
			},
			{
				id: 370400,
				province: '山东省',
				city: '枣庄市'
			},
			{
				id: 370500,
				province: '山东省',
				city: '东营市'
			},
			{
				id: 370600,
				province: '山东省',
				city: '烟台市'
			},
			{
				id: 370700,
				province: '山东省',
				city: '潍坊市'
			},
			{
				id: 370800,
				province: '山东省',
				city: '济宁市'
			},
			{
				id: 370900,
				province: '山东省',
				city: '泰安市'
			},
			{
				id: 371000,
				province: '山东省',
				city: '威海市'
			},
			{
				id: 371100,
				province: '山东省',
				city: '日照市'
			},
			{
				id: 371200,
				province: '山东省',
				city: '莱芜市'
			},
			{
				id: 371300,
				province: '山东省',
				city: '临沂市'
			},
			{
				id: 371400,
				province: '山东省',
				city: '德州市'
			},
			{
				id: 371500,
				province: '山东省',
				city: '聊城市'
			},
			{
				id: 371600,
				province: '山东省',
				city: '滨州市'
			},
			{
				id: 371700,
				province: '山东省',
				city: '菏泽市'
			},
			{
				id: 410100,
				province: '河南省',
				city: '郑州市'
			},
			{
				id: 410200,
				province: '河南省',
				city: '开封市'
			},
			{
				id: 410300,
				province: '河南省',
				city: '洛阳市'
			},
			{
				id: 410400,
				province: '河南省',
				city: '平顶山市'
			},
			{
				id: 410500,
				province: '河南省',
				city: '安阳市'
			},
			{
				id: 410600,
				province: '河南省',
				city: '鹤壁市'
			},
			{
				id: 410700,
				province: '河南省',
				city: '新乡市'
			},
			{
				id: 410800,
				province: '河南省',
				city: '焦作市'
			},
			{
				id: 410900,
				province: '河南省',
				city: '濮阳市'
			},
			{
				id: 411000,
				province: '河南省',
				city: '许昌市'
			},
			{
				id: 411100,
				province: '河南省',
				city: '漯河市'
			},
			{
				id: 411200,
				province: '河南省',
				city: '三门峡市'
			},
			{
				id: 411300,
				province: '河南省',
				city: '南阳市'
			},
			{
				id: 411400,
				province: '河南省',
				city: '商丘市'
			},
			{
				id: 411500,
				province: '河南省',
				city: '信阳市'
			},
			{
				id: 411600,
				province: '河南省',
				city: '周口市'
			},
			{
				id: 411700,
				province: '河南省',
				city: '驻马店市'
			},
			{
				id: 420100,
				province: '湖北省',
				city: '武汉市'
			},
			{
				id: 420200,
				province: '湖北省',
				city: '黄石市'
			},
			{
				id: 420300,
				province: '湖北省',
				city: '十堰市'
			},
			{
				id: 420500,
				province: '湖北省',
				city: '宜昌市'
			},
			{
				id: 420600,
				province: '湖北省',
				city: '襄阳市'
			},
			{
				id: 420700,
				province: '湖北省',
				city: '鄂州市'
			},
			{
				id: 420800,
				province: '湖北省',
				city: '荆门市'
			},
			{
				id: 420900,
				province: '湖北省',
				city: '孝感市'
			},
			{
				id: 421000,
				province: '湖北省',
				city: '荆州市'
			},
			{
				id: 421100,
				province: '湖北省',
				city: '黄冈市'
			},
			{
				id: 421200,
				province: '湖北省',
				city: '咸宁市'
			},
			{
				id: 421300,
				province: '湖北省',
				city: '随州市'
			},
			{
				id: 422800,
				province: '湖北省',
				city: '恩施土家族苗族自治州'
			},
			{
				id: 430100,
				province: '湖南省',
				city: '长沙市'
			},
			{
				id: 430200,
				province: '湖南省',
				city: '株洲市'
			},
			{
				id: 430300,
				province: '湖南省',
				city: '湘潭市'
			},
			{
				id: 430400,
				province: '湖南省',
				city: '衡阳市'
			},
			{
				id: 430500,
				province: '湖南省',
				city: '邵阳市'
			},
			{
				id: 430600,
				province: '湖南省',
				city: '岳阳市'
			},
			{
				id: 430700,
				province: '湖南省',
				city: '常德市'
			},
			{
				id: 430800,
				province: '湖南省',
				city: '张家界市'
			},
			{
				id: 430900,
				province: '湖南省',
				city: '益阳市'
			},
			{
				id: 431000,
				province: '湖南省',
				city: '郴州市'
			},
			{
				id: 431100,
				province: '湖南省',
				city: '永州市'
			},
			{
				id: 431200,
				province: '湖南省',
				city: '怀化市'
			},
			{
				id: 431300,
				province: '湖南省',
				city: '娄底市'
			},
			{
				id: 433100,
				province: '湖南省',
				city: '湘西土家族苗族自治州'
			},
			{
				id: 440100,
				province: '广东省',
				city: '广州市'
			},
			{
				id: 440200,
				province: '广东省',
				city: '韶关市'
			},
			{
				id: 440300,
				province: '广东省',
				city: '深圳市'
			},
			{
				id: 440400,
				province: '广东省',
				city: '珠海市'
			},
			{
				id: 440500,
				province: '广东省',
				city: '汕头市'
			},
			{
				id: 440600,
				province: '广东省',
				city: '佛山市'
			},
			{
				id: 440700,
				province: '广东省',
				city: '江门市'
			},
			{
				id: 440800,
				province: '广东省',
				city: '湛江市'
			},
			{
				id: 440900,
				province: '广东省',
				city: '茂名市'
			},
			{
				id: 441200,
				province: '广东省',
				city: '肇庆市'
			},
			{
				id: 441300,
				province: '广东省',
				city: '惠州市'
			},
			{
				id: 441400,
				province: '广东省',
				city: '梅州市'
			},
			{
				id: 441500,
				province: '广东省',
				city: '汕尾市'
			},
			{
				id: 441600,
				province: '广东省',
				city: '河源市'
			},
			{
				id: 441700,
				province: '广东省',
				city: '阳江市'
			},
			{
				id: 441800,
				province: '广东省',
				city: '清远市'
			},
			{
				id: 441900,
				province: '广东省',
				city: '东莞市'
			},
			{
				id: 442000,
				province: '广东省',
				city: '中山市'
			},
			{
				id: 445100,
				province: '广东省',
				city: '潮州市'
			},
			{
				id: 445200,
				province: '广东省',
				city: '揭阳市'
			},
			{
				id: 445300,
				province: '广东省',
				city: '云浮市'
			},
			{
				id: 450100,
				province: '广西壮族自治区',
				city: '南宁市'
			},
			{
				id: 450200,
				province: '广西壮族自治区',
				city: '柳州市'
			},
			{
				id: 450300,
				province: '广西壮族自治区',
				city: '桂林市'
			},
			{
				id: 450400,
				province: '广西壮族自治区',
				city: '梧州市'
			},
			{
				id: 450500,
				province: '广西壮族自治区',
				city: '北海市'
			},
			{
				id: 450600,
				province: '广西壮族自治区',
				city: '防城港市'
			},
			{
				id: 450700,
				province: '广西壮族自治区',
				city: '钦州市'
			},
			{
				id: 450800,
				province: '广西壮族自治区',
				city: '贵港市'
			},
			{
				id: 450900,
				province: '广西壮族自治区',
				city: '玉林市'
			},
			{
				id: 451000,
				province: '广西壮族自治区',
				city: '百色市'
			},
			{
				id: 451100,
				province: '广西壮族自治区',
				city: '贺州市'
			},
			{
				id: 451200,
				province: '广西壮族自治区',
				city: '河池市'
			},
			{
				id: 451300,
				province: '广西壮族自治区',
				city: '来宾市'
			},
			{
				id: 451400,
				province: '广西壮族自治区',
				city: '崇左市'
			},
			{
				id: 460100,
				province: '海南省',
				city: '海口市'
			},
			{
				id: 460200,
				province: '海南省',
				city: '三亚市'
			},
			{
				id: 460300,
				province: '海南省',
				city: '三沙市'
			},
			{
				id: 460400,
				province: '海南省',
				city: '儋州市'
			},
			{
				id: 510100,
				province: '四川省',
				city: '成都市'
			},
			{
				id: 510300,
				province: '四川省',
				city: '自贡市'
			},
			{
				id: 510400,
				province: '四川省',
				city: '攀枝花市'
			},
			{
				id: 510500,
				province: '四川省',
				city: '泸州市'
			},
			{
				id: 510600,
				province: '四川省',
				city: '德阳市'
			},
			{
				id: 510700,
				province: '四川省',
				city: '绵阳市'
			},
			{
				id: 510800,
				province: '四川省',
				city: '广元市'
			},
			{
				id: 510900,
				province: '四川省',
				city: '遂宁市'
			},
			{
				id: 511000,
				province: '四川省',
				city: '内江市'
			},
			{
				id: 511100,
				province: '四川省',
				city: '乐山市'
			},
			{
				id: 511300,
				province: '四川省',
				city: '南充市'
			},
			{
				id: 511400,
				province: '四川省',
				city: '眉山市'
			},
			{
				id: 511500,
				province: '四川省',
				city: '宜宾市'
			},
			{
				id: 511600,
				province: '四川省',
				city: '广安市'
			},
			{
				id: 511700,
				province: '四川省',
				city: '达州市'
			},
			{
				id: 511800,
				province: '四川省',
				city: '雅安市'
			},
			{
				id: 511900,
				province: '四川省',
				city: '巴中市'
			},
			{
				id: 512000,
				province: '四川省',
				city: '资阳市'
			},
			{
				id: 513200,
				province: '四川省',
				city: '阿坝藏族羌族自治州'
			},
			{
				id: 513300,
				province: '四川省',
				city: '甘孜藏族自治州'
			},
			{
				id: 513400,
				province: '四川省',
				city: '凉山彝族自治州'
			},
			{
				id: 520100,
				province: '贵州省',
				city: '贵阳市'
			},
			{
				id: 520200,
				province: '贵州省',
				city: '六盘水市'
			},
			{
				id: 520300,
				province: '贵州省',
				city: '遵义市'
			},
			{
				id: 520400,
				province: '贵州省',
				city: '安顺市'
			},
			{
				id: 520500,
				province: '贵州省',
				city: '毕节市'
			},
			{
				id: 520600,
				province: '贵州省',
				city: '铜仁市'
			},
			{
				id: 522300,
				province: '贵州省',
				city: '黔西南布依族苗族自治州'
			},
			{
				id: 522600,
				province: '贵州省',
				city: '黔东南苗族侗族自治州'
			},
			{
				id: 522700,
				province: '贵州省',
				city: '黔南布依族苗族自治州'
			},
			{
				id: 530100,
				province: '云南省',
				city: '昆明市'
			},
			{
				id: 530300,
				province: '云南省',
				city: '曲靖市'
			},
			{
				id: 530400,
				province: '云南省',
				city: '玉溪市'
			},
			{
				id: 530500,
				province: '云南省',
				city: '保山市'
			},
			{
				id: 530600,
				province: '云南省',
				city: '昭通市'
			},
			{
				id: 530700,
				province: '云南省',
				city: '丽江市'
			},
			{
				id: 530800,
				province: '云南省',
				city: '普洱市'
			},
			{
				id: 530900,
				province: '云南省',
				city: '临沧市'
			},
			{
				id: 532300,
				province: '云南省',
				city: '楚雄彝族自治州'
			},
			{
				id: 532500,
				province: '云南省',
				city: '红河哈尼族彝族自治州'
			},
			{
				id: 532600,
				province: '云南省',
				city: '文山壮族苗族自治州'
			},
			{
				id: 532800,
				province: '云南省',
				city: '西双版纳傣族自治州'
			},
			{
				id: 532900,
				province: '云南省',
				city: '大理白族自治州'
			},
			{
				id: 533100,
				province: '云南省',
				city: '德宏傣族景颇族自治州'
			},
			{
				id: 533300,
				province: '云南省',
				city: '怒江傈僳族自治州'
			},
			{
				id: 533400,
				province: '云南省',
				city: '迪庆藏族自治州'
			},
			{
				id: 540100,
				province: '西藏自治区',
				city: '拉萨市'
			},
			{
				id: 540200,
				province: '西藏自治区',
				city: '日喀则市'
			},
			{
				id: 540300,
				province: '西藏自治区',
				city: '昌都市'
			},
			{
				id: 540400,
				province: '西藏自治区',
				city: '林芝市'
			},
			{
				id: 540500,
				province: '西藏自治区',
				city: '山南市'
			},
			{
				id: 542400,
				province: '西藏自治区',
				city: '那曲地区'
			},
			{
				id: 542500,
				province: '西藏自治区',
				city: '阿里地区'
			},
			{
				id: 610100,
				province: '陕西省',
				city: '西安市'
			},
			{
				id: 610200,
				province: '陕西省',
				city: '铜川市'
			},
			{
				id: 610300,
				province: '陕西省',
				city: '宝鸡市'
			},
			{
				id: 610400,
				province: '陕西省',
				city: '咸阳市'
			},
			{
				id: 610500,
				province: '陕西省',
				city: '渭南市'
			},
			{
				id: 610600,
				province: '陕西省',
				city: '延安市'
			},
			{
				id: 610700,
				province: '陕西省',
				city: '汉中市'
			},
			{
				id: 610800,
				province: '陕西省',
				city: '榆林市'
			},
			{
				id: 610900,
				province: '陕西省',
				city: '安康市'
			},
			{
				id: 611000,
				province: '陕西省',
				city: '商洛市'
			},
			{
				id: 620100,
				province: '甘肃省',
				city: '兰州市'
			},
			{
				id: 620200,
				province: '甘肃省',
				city: '嘉峪关市'
			},
			{
				id: 620300,
				province: '甘肃省',
				city: '金昌市'
			},
			{
				id: 620400,
				province: '甘肃省',
				city: '白银市'
			},
			{
				id: 620500,
				province: '甘肃省',
				city: '天水市'
			},
			{
				id: 620600,
				province: '甘肃省',
				city: '武威市'
			},
			{
				id: 620700,
				province: '甘肃省',
				city: '张掖市'
			},
			{
				id: 620800,
				province: '甘肃省',
				city: '平凉市'
			},
			{
				id: 620900,
				province: '甘肃省',
				city: '酒泉市'
			},
			{
				id: 621000,
				province: '甘肃省',
				city: '庆阳市'
			},
			{
				id: 621100,
				province: '甘肃省',
				city: '定西市'
			},
			{
				id: 621200,
				province: '甘肃省',
				city: '陇南市'
			},
			{
				id: 622900,
				province: '甘肃省',
				city: '临夏回族自治州'
			},
			{
				id: 623000,
				province: '甘肃省',
				city: '甘南藏族自治州'
			},
			{
				id: 630100,
				province: '青海省',
				city: '西宁市'
			},
			{
				id: 630200,
				province: '青海省',
				city: '海东市'
			},
			{
				id: 632200,
				province: '青海省',
				city: '海北藏族自治州'
			},
			{
				id: 632300,
				province: '青海省',
				city: '黄南藏族自治州'
			},
			{
				id: 632500,
				province: '青海省',
				city: '海南藏族自治州'
			},
			{
				id: 632600,
				province: '青海省',
				city: '果洛藏族自治州'
			},
			{
				id: 632700,
				province: '青海省',
				city: '玉树藏族自治州'
			},
			{
				id: 632800,
				province: '青海省',
				city: '海西蒙古族藏族自治州'
			},
			{
				id: 640100,
				province: '宁夏回族自治区',
				city: '银川市'
			},
			{
				id: 640200,
				province: '宁夏回族自治区',
				city: '石嘴山市'
			},
			{
				id: 640300,
				province: '宁夏回族自治区',
				city: '吴忠市'
			},
			{
				id: 640400,
				province: '宁夏回族自治区',
				city: '固原市'
			},
			{
				id: 640500,
				province: '宁夏回族自治区',
				city: '中卫市'
			},
			{
				id: 650100,
				province: '新疆维吾尔自治区',
				city: '乌鲁木齐市'
			},
			{
				id: 650200,
				province: '新疆维吾尔自治区',
				city: '克拉玛依市'
			},
			{
				id: 650400,
				province: '新疆维吾尔自治区',
				city: '吐鲁番市'
			},
			{
				id: 650500,
				province: '新疆维吾尔自治区',
				city: '哈密市'
			},
			{
				id: 652300,
				province: '新疆维吾尔自治区',
				city: '昌吉回族自治州'
			},
			{
				id: 652700,
				province: '新疆维吾尔自治区',
				city: '博尔塔拉蒙古自治州'
			},
			{
				id: 652800,
				province: '新疆维吾尔自治区',
				city: '巴音郭楞蒙古自治州'
			},
			{
				id: 652900,
				province: '新疆维吾尔自治区',
				city: '阿克苏地区'
			},
			{
				id: 653000,
				province: '新疆维吾尔自治区',
				city: '克孜勒苏柯尔克孜自治州'
			},
			{
				id: 653100,
				province: '新疆维吾尔自治区',
				city: '喀什地区'
			},
			{
				id: 653200,
				province: '新疆维吾尔自治区',
				city: '和田地区'
			},
			{
				id: 654000,
				province: '新疆维吾尔自治区',
				city: '伊犁哈萨克自治州'
			},
			{
				id: 654200,
				province: '新疆维吾尔自治区',
				city: '塔城地区'
			},
			{
				id: 654300,
				province: '新疆维吾尔自治区',
				city: '阿勒泰地区'
			},
			{
				id: 810000,
				province: '香港特别行政区',
				city: '香港特别行政区'
			},
			{
				id: 820000,
				province: '澳门特别行政区',
				city: '澳门特别行政区'
			},
			{
				id: 110000,
				province: '北京市',
				city: '北京市'
			},
			{
				id: 120000,
				province: '天津市',
				city: '天津市'
			},
			{
				id: 500000,
				province: '重庆市',
				city: '重庆市'
			},
			{
				id: 310000,
				province: '上海市',
				city: '上海市'
			}
		]
		const result = [];
		const provinceMap = {};
		data.forEach(item => {
			const {
				province,
				city,
				id
			} = item;
			if (!provinceMap[province]) {
				provinceMap[province] = {
					text: province,
					value: `${id}-0`,
					children: []
				};
				result.push(provinceMap[province]);
			}
			provinceMap[province].children.push({
				text: city,
				value: `${id}`
			});
		});
		return result

	}
	//主体类型
	function changesubject_type(e) {

		if (e == 'SUBJECT_TYPE_ENTERPRISE') {
			txdata.value.subject_info.identity_info.owner = true
		} else {
			txdata.value.subject_info.identity_info.owner = false
		}
		//选择的企业或者个人也会影响后面选择的企业规则
		if (e == 'SUBJECT_TYPE_ENTERPRISE') {
			data.settlement = data.settlementarr[1].children[0].value
			txdata.value.settlement_info.settlement_id = data.settlementarr[1].children[0].value
			txdata.value.settlement_info.qualification_type = data.settlementarr[1].children[0].text
		} else if (e == 'SUBJECT_TYPE_INDIVIDUAL') {
			data.settlement = data.settlementarr[0].children[0].value
			txdata.value.settlement_info.settlement_id = data.settlementarr[1].children[0].value
			txdata.value.settlement_info.qualification_type = data.settlementarr[1].children[0].text
		}
	}
	//选择证件类型
	function changedid_doc_type(e) {
		txdata.value.subject_info.identity_info.id_doc_type = e
		if (e == 'IDENTIFICATION_TYPE_IDCARD') {
			data.istype = true
		} else {
			data.istype = false
		}
		console.log(txdata.value.subject_info.identity_info.id_doc_type, "22")
	}

	function changedoc_type(e) {} //选择证件类型
	function maskClick(e) {} //证件有效期开始时间
	function changebankcode(e) { //开户银行省市区
		console.log(e, "e")
		txdata.value.bank_account_info.bank_address_code = e.detail.value[e.detail.value.length - 1].value


	}

	function changebank(e) { //开户银行

	}

	function onchange(e) {
		console.log(e, 3)
	} //入驻结算规则ID
	function onnodeclick(e) {
		console.log(e, "e")
		data.onnode = e
		txdata.value.settlement_info.settlement_id = e.detail.value[e.detail.value.length - 1].value
		txdata.value.settlement_info.qualification_type = e.detail.value[e.detail.value.length - 1].text
		console.log(data.settlementarr, "settlementarr")
		console.log(data.settlement, "settlement")

	} //入驻结算规则ID
	function checkedchange() {
		checked.value = !checked.value
	}



	function setSelectAddress() { //打开地址选择弹窗
		lcwAddressRef.value.open();
	}
	//业务办理授权函
	function business_authorization_letter(e, obj) {
		if (obj.data.tempFiles[0].size > 5242880) {
			uni.showToast({
				icon: 'none',
				title: "文件内容过大,请小于5M"
			})
		} else {
      imgobj.value.business_authorization_letter = e

			uni.uploadFile({
				url: proxy.$baseurl+'api/uploadFile/',
				file: obj.data.tempFiles[0],
				name: 'file',
				formData: {
					fileName: obj.data.tempFiles[0].name,
					code: "0" //0图片 1视频
				},
				success: (res) => {
					let data = res.data
					txdata.value.contact_info.business_authorization_letter = JSON.parse(data).errmsg

				}
			});
		}
	}
	//法定代表人说明函
	function authorize_letter_copy(e, obj) {
		if (obj.data.tempFiles[0].size > 5242880) {
			uni.showToast({
				icon: 'none',
				title: "文件内容过大,请小于5M"
			})
		} else {
      imgobj.value.authorize_letter_copy = e

			uni.uploadFile({
				url: proxy.$baseurl+'api/uploadFile/',
				file: obj.data.tempFiles[0],
				name: 'file',
				formData: {
					fileName: obj.data.tempFiles[0].name,
					code: "0" //0图片 1视频
				},
				success: (res) => {
					let data = res.data
					txdata.value.subject_info.identity_info.authorize_letter_copy = JSON.parse(data).errmsg
				}
			});
		}
	}
	//店铺门头照
	function shop_head(e) {
		txdata.value.shop_head = e
	}
	//身份证正面上传   0 身份证正面 1身份证反面 2营业执照
	function contact_id_doc_copy(e, obj) {
		console.log(e, "ee")
		if (obj.data.tempFiles[0].size > 5242880) {
			uni.showToast({
				icon: 'none',
				title: "文件内容过大,请小于5M"
			})
		} else {
      imgobj.value.contact_id_doc_copy = e

			proxy.$request({
				url: `api/imageRecognition/`,
				method: 'post',
				data: {
					image: e,
					code: 0
				},
				success(res) {
					console.log(res, "res")
					txdata.value.contact_info.contact_name = res.data.name
					txdata.value.contact_info.contact_id_number = res.data.num
				}
			})
			uni.uploadFile({
				url: proxy.$baseurl+'api/uploadFile/',
				file: obj.data.tempFiles[0],
				name: 'file',
				formData: {
					fileName: obj.data.tempFiles[0].name,
					code: "0" //0图片 1视频
				},
				success: (res) => {

					let data = res.data
					txdata.value.contact_info.contact_id_doc_copy = JSON.parse(data).errmsg
				}
			});
		}

	}

	//身份证反面上传   0 身份证正面 1身份证反面 2营业执照
	function contact_id_doc_copy_back(e, obj) {
		// data.form.positive = e
		if (obj.data.tempFiles[0].size > 5242880) {
			uni.showToast({
				icon: 'none',
				title: "文件内容过大,请小于5M"
			})
		} else {
      imgobj.value.contact_id_doc_copy_back = e

			proxy.$request({
				url: `api/imageRecognition/`,
				method: 'post',
				data: {
					image: e,
					code: 1
				},
				success(res) {
					txdata.value.contact_info.contact_period_begin = formatDate(res.data.start_date)
					txdata.value.contact_info.contact_period_end = formatDate(res.data.end_date)
				}
			})
			uni.uploadFile({
				url: proxy.$baseurl+'api/uploadFile/',
				file: obj.data.tempFiles[0],
				name: 'file',
				formData: {
					fileName: obj.data.tempFiles[0].name,
					code: "0" //0图片 1视频
				},
				success: (res) => {

					let data = res.data
					txdata.value.contact_info.contact_id_doc_copy_back = JSON.parse(data).errmsg
				}
			});
		}

	}
	//营业执照  0 身份证正面 1身份证反面 2营业执照
	function license_copy(e, obj) {
		if (obj.data.tempFiles[0].size > 5242880) {
			uni.showToast({
				icon: 'none',
				title: "文件内容过大,请小于5M"
			})
		} else {
      imgobj.value.license_copy = e

			proxy.$request({
				url: `api/imageRecognition/`,
				method: 'post',
				data: {
					image: e,
					code: 2
				},
				success(res) {
					console.log(res)
					txdata.value.subject_info.business_license_info.license_number = res.data.reg_num
					txdata.value.subject_info.business_license_info.merchant_name = res.data.name
					txdata.value.subject_info.business_license_info.legal_person = res.data.person
					txdata.value.subject_info.business_license_info.license_address = res.data.address
					txdata.value.subject_info.business_license_info.period_begin = formatDates(res.data.issue_date)
					txdata.value.subject_info.business_license_info.period_end = "长期"
					console.log(txdata, "txdata")
				}
			})

			uni.uploadFile({
				url: proxy.$baseurl+'api/uploadFile/',
				file: obj.data.tempFiles[0],
				name: 'file',
				formData: {
					fileName: obj.data.tempFiles[0].name,
					code: "0" //0图片 1视频
				},
				success: (res) => {

					let data = res.data
					txdata.value.subject_info.business_license_info.license_copy = JSON.parse(data).errmsg
				}
			});
		}



	}
	//身份证正面  0 身份证正面 1身份证反面 2营业执照
	function id_card_copy(e, obj) {
		// data.form.positive = e

		if (obj.data.tempFiles[0].size > 1024*1024*5) {
			uni.showToast({
				icon: 'none',
				title: "文件内容过大,请小于5M"
			})
		} else {
      imgobj.value.id_card_copy = e

			proxy.$request({
				url: `api/imageRecognition/`,
				method: 'post',
				data: {
					image: e,
					code: 0
				},
				success(res) {
					if (res.data.hasOwnProperty('name')) {
						txdata.value.subject_info.identity_info.id_card_info.id_card_name = res.data.name
						txdata.value.subject_info.identity_info.id_card_info.id_card_number = res.data.num
						txdata.value.subject_info.identity_info.id_card_info.id_card_address = res.data.address
					}

				}
			})

			uni.uploadFile({
				url: proxy.$baseurl+'api/uploadFile/',
				file: obj.data.tempFiles[0],
				name: 'file',
				formData: {
					fileName: obj.data.tempFiles[0].name,
					code: "0" //0图片 1视频
				},
				success: (res) => {
					let data = res.data
          console.log(data, "uploadFile>>>")
					txdata.value.subject_info.identity_info.id_card_info.id_card_copy = JSON.parse(data).errmsg
				},
			});
		}


	}
	//身份证正面  0 身份证正面 1身份证反面 2营业执照
	function id_doc_copy(e, obj) {
		console.log(e, "eeee")
		if (obj.data.tempFiles[0].size > 5242880) {
			uni.showToast({
				icon: 'none',
				title: "文件内容过大,请小于5M"
			})
		} else {
      imgobj.value.id_doc_copy = e

			// data.form.positive = e
			proxy.$request({
				url: `api/imageRecognition/`,
				method: 'post',
				data: {
					image: e,
					code: 1
				},
				success(res) {
					console.log(res, "res")
					txdata.value.subject_info.identity_info.id_doc_info.doc_period_begin = formatDate(res.data
						.start_date)
					txdata.value.subject_info.identity_info.id_doc_info.doc_period_end = formatDate(res.data
						.end_date)
				}
			})
			uni.uploadFile({
				url: proxy.$baseurl+'api/uploadFile/',
				file: obj.data.tempFiles[0],
				name: 'file',
				formData: {
					fileName: obj.data.tempFiles[0].name,
					code: "0" //0图片 1视频
				},
				success: (res) => {
					let data = res.data
					txdata.value.subject_info.identity_info.id_doc_info.id_doc_copy = JSON.parse(data).errmsg
				}
			});
		}
	}
	//身份证反面  0 身份证正面 1身份证反面 2营业执照
	function id_card_national(e, obj) {
		// data.form.positive = e
		if (obj.data.tempFiles[0].size > 5242880) {
			uni.showToast({
				icon: 'none',
				title: "文件内容过大,请小于5M"
			})
		} else {
      imgobj.value.id_card_national = e

			proxy.$request({
				url: `api/imageRecognition/`,
				method: 'post',
				data: {
					image: e,
					code: 1
				},
				success(res) {

					txdata.value.subject_info.identity_info.id_card_info.card_period_begin = formatDate(res.data
						.start_date)
					txdata.value.subject_info.identity_info.id_card_info.card_period_end = formatDate(res.data
						.end_date)
				}
			})
			uni.uploadFile({
				url: proxy.$baseurl+'api/uploadFile/',
				file: obj.data.tempFiles[0],
				name: 'file',
				formData: {
					fileName: obj.data.tempFiles[0].name,
					code: "0" //0图片 1视频
				},
				success: (res) => {
					let data = res.data
					txdata.value.subject_info.identity_info.id_card_info.id_card_national = JSON.parse(data)
						.errmsg
				}
			});
		}

	}
	//身份证反面  0 身份证正面 1身份证反面 2营业执照
	function id_doc_copy_backs(e, obj) {
		// data.form.positive = e
		if (obj.data.tempFiles[0].size > 5242880) {
			uni.showToast({
				icon: 'none',
				title: "文件内容过大,请小于5M"
			})
		} else {
      imgobj.value.id_doc_copy_backs = e

			proxy.$request({
				url: `api/imageRecognition/`,
				method: 'post',
				data: {
					image: e,
					code: 0
				},
				success(res) {
					console.log(res, "res")
					txdata.value.subject_info.identity_info.id_doc_info.id_doc_name = res.data.name
					txdata.value.subject_info.identity_info.id_doc_info.id_doc_number = res.data.num
					txdata.value.subject_info.identity_info.id_doc_info.id_doc_address = res.data.address

				}
			})
			uni.uploadFile({
				url: proxy.$baseurl+'api/uploadFile/',
				file: obj.data.tempFiles[0],
				name: 'file',
				formData: {
					fileName: obj.data.tempFiles[0].name,
					code: "0" //0图片 1视频
				},
				success: (res) => {
					let data = res.data
					txdata.value.subject_info.identity_info.id_doc_info.id_doc_copy_back = JSON.parse(data)
						.errmsg
				}
			});
		}

	}
	//身份证正面  0 身份证正面 1身份证反面 2营业执照
	function ubo_id_doc_copy(e, obj, i) {
		if (obj.data.tempFiles[0].size > 5242880) {
			uni.showToast({
				icon: 'none',
				title: "文件内容过大,请小于5M"
			})
		} else {
      imgobj.value.ubo_id_doc_copy[i] = e

			proxy.$request({
				url: `api/imageRecognition/`,
				method: 'post',
				data: {
					image: e,
					code: 0
				},
				success(res) {

					txdata.value.subject_info.ubo_info_list[i].ubo_id_doc_name = res.data.name
					txdata.value.subject_info.ubo_info_list[i].ubo_id_doc_number = res.data.num
					txdata.value.subject_info.ubo_info_list[i].ubo_id_doc_address = res.data.address
				}
			})
			uni.uploadFile({
				url: proxy.$baseurl+'api/uploadFile/',
				file: obj.data.tempFiles[0],
				name: 'file',
				formData: {
					fileName: obj.data.tempFiles[0].name,
					code: "0" //0图片 1视频
				},
				success: (res) => {

					let data = res.data
					txdata.value.subject_info.ubo_info_list[i] = JSON.parse(data).errmsg
				}
			});
		}
	}
	//身份证反面  0 身份证正面 1身份证反面 2营业执照
	function ubo_id_doc_copy_back(e, obj, i) {
		if (obj.data.tempFiles[0].size > 5242880) {
			uni.showToast({
				icon: 'none',
				title: "文件内容过大,请小于5M"
			})
		} else {
      imgobj.value.ubo_id_doc_copy_back[i] = e

			proxy.$request({
				url: `api/imageRecognition/`,
				method: 'post',
				data: {
					image: e,
					code: 1
				},
				success(res) {
					txdata.value.subject_info.ubo_info_list[i].ubo_period_begin = formatDate(res.data.start_date)
					txdata.value.subject_info.ubo_info_list[i].ubo_period_end = formatDate(res.data.end_date)
				}
			})
			uni.uploadFile({
				url: proxy.$baseurl+'api/uploadFile/',
				file: obj.data.tempFiles[0],
				name: 'file',
				formData: {
					fileName: obj.data.tempFiles[0].name,
					code: "0" //0图片 1视频
				},
				success: (res) => {
					let data = res.data
					txdata.value.subject_info.ubo_info_list[i].ubo_id_doc_copy_back = JSON.parse(data).errmsg
				}
			});
		}
	}
	// 特殊资质图片
	function qualifications(e) {
		imgobj.value.qualifications = e

		uni.uploadFile({
			url: proxy.$baseurl+'api/uploadFile/',
			file: obj.data.tempFile,
			name: 'file',
			formData: {
				fileName: obj.data.name,
				code: "0" //0图片 1视频
			},
			success: (res) => {
				let data = res.data
				txdata.value.addition_info.legal_person_commitment = JSON.parse(data).errmsg
			}
		});
	}
	// 法人开户承诺函
	function legal_person_commitment(e) {
		imgobj.value.legal_person_commitment = e
		uni.uploadFile({
			url: proxy.$baseurl+'api/uploadFile/',
			file: obj.data.tempFile,
			name: 'file',
			formData: {
				fileName: obj.data.name,
				code: "0" //0图片 1视频
			},
			success: (res) => {
				let data = res.data
				txdata.value.addition_info.legal_person_commitment = JSON.parse(data).errmsg
			}
		});
	}
	//法人开户意愿视频
	function legal_person_video(e, obj) {
		if (obj.data.tempFiles[0].size > 5242880) {
			uni.showToast({
				icon: 'none',
				title: "文件内容过大,请小于5M"
			})
		} else {
      imgobj.value.legal_person_video = e

			uni.uploadFile({
				url: proxy.$baseurl+'api/uploadFile/',
				file: obj.data.tempFile,
				name: 'file',
				formData: {
					fileName: obj.data.name,
					code: "1" //0图片 1视频
				},
				success: (res) => {
					let data = res.data
					txdata.value.addition_info.legal_person_video = JSON.parse(data).errmsg
				}
			});
		}
	}
	//补充材料
	function business_addition_pics(e, obj) {
		if (obj.data.tempFiles[0].size > 5242880) {
			uni.showToast({
				icon: 'none',
				title: "文件内容过大,请小于5M"
			})
		} else {
			uni.uploadFile({
				url: proxy.$baseurl+'api/uploadFile/',
				file: obj.data.tempFile,
				name: 'file',
				formData: {
					fileName: obj.data.name,
					code: "0" //0图片 1视频
				},
				success: (res) => {
					console.log(res, "res")
				}
			});
		}
	}

	//时间修改函数
	function formatDate(dateString) {
		// 检查输入是否为有效的日期字符串
		if (!/^\d{8}$/.test(dateString)) {
			return dateString;
		}

		// 提取年、月、日部分
		const year = dateString.substring(0, 4);
		const month = dateString.substring(4, 6);
		const day = dateString.substring(6, 8);

		// 返回格式化后的日期字符串
		return `${year}-${month}-${day}`;
	}

	function formatDates(dateStr) {
		// 使用正则表达式提取年份、月份和日期
		let match = dateStr.match(/(\d{4})年(\d{2})月(\d{2})日/);
		if (match) {
			let year = match[1];
			let month = match[2];
			let day = match[3];

			// 格式化为新的日期字符串
			return `${year}-${month}-${day}`;
		} else {
			throw new Error("日期格式不正确");
		}
	}


	//提交 草稿
	function applyBusiness(e) {
		console.log("txdata.value", txdata.value)
		//拿经纬度
		txdata.value.code = e
		if (e == 1) {
      txdata.value.img_info = JSON.stringify(imgobj.value)

      proxy.$request({ //申请
        url: `api/businessMerchantApply/?code=${e}`,
        method: 'POST',
        data: txdata.value,
        success(res) {

          if (res.errno == 0 && e == 0) {
            // data.state = 4
            uni.showToast({
              icon: "none",
              title: res.errmsg
            })
          } else if (res.errno == 0) {
            uni.showToast({
              icon: "none",
              title: '已提交申请'
            })
            uni.switchTab({
              url: '/pages/personal/index'
            })
          } else {
            // 要查找的子字符串
            const searchString = "为必填字段";
            if (res.errmsg.includes(searchString)) {
              // 要查找的子字符串
              const searchString = "为必填字段";
              // 检查并删除子字符串
              let errmsg = ''
              if (res.errmsg.includes(searchString)) {
                errmsg = res.errmsg.replace(searchString, '');
              }
              let str = getshowToast(errmsg)
              if (str) {
                uni.showToast({
                  icon: "none",
                  title: str + '为必填'
                })
              }
            } else {
              uni.showToast({
                icon: "none",
                title: res.errmsg
              })
            }

          }
        }
      })
			// uni.request({ //地址换经纬度
			// 	url: `https://restapi.amap.com/v3/geocode/geo?address=${txdata.value.province+txdata.value.city+txdata.value.area+txdata.value.address}&key=3e2ed72107f91ba0e8a4f25e297eba78`,
			// 	method: "GET",
			// 	success(res) {
			// 		if (res.data.status == 1) {
			// 			// const address = res.data.geocodes[0].location.split(",");
			// 			// txdata.value.latitude = Number(address[0])
			// 			// txdata.value.longitude = Number(address[1])
			//
			// 		} else {
			// 			uni.showToast({
			// 				icon: "none",
			// 				title: '请填写地址信息'
			// 			})
			// 		}
			// 	},
			// });
		} else {
			txdata.value.img_info = JSON.stringify(imgobj.value)
			proxy.$request({ //保存草稿
				url: `api/businessMerchantApply/?code=${e}`,
				method: 'POST',
				data: txdata.value,
				success(res) {
					console.log("res", res)
					if (res.errno == 0 && e == 0) {
						// data.state = 4
						uni.showToast({
							icon: "none",
							title: res.errmsg
						})
					} else if (res.errno == 0 && res.errmsg == "") {
						uni.showToast({
							icon: "none",
							title: '已提交申请'
						})
						uni.switchTab({
							url: '/pages/personal/index'
						})
					} else {
						// 要查找的子字符串
						const searchString = "为必填字段";
						if (res.errmsg.includes(searchString)) {
							// 要查找的子字符串
							const searchString = "为必填字段";
							// 检查并删除子字符串
							let errmsg = ''
							if (res.errmsg.includes(searchString)) {
								errmsg = res.errmsg.replace(searchString, '');
							}
							let str = getshowToast(errmsg)
							if (str) {
								uni.showToast({
									icon: "none",
									title: str + '为必填'
								})
							}
						} else {
							uni.showToast({
								icon: "none",
								title: res.errmsg
							})
						}

					}
				}
			})
		}

	}

	function changeCheckbox(e) {
		console.log(e)
	}


	//这里筛选返回的提示
	function getshowToast(e) {

		let obj = { //自定义提示
			contact_name: '超级管理员姓名',
			contact_id_number: '超级管理员身份证件号码',
			contact_id_doc_copy: '超级管理员证件正面照片',
			contact_id_doc_copy_back: '超级管理员证件反面照片',
			contact_period_begin: '超级管理员证件有效期开始时间',
			contact_period_end: '超级管理员证件有效期结束时间',
			business_authorization_letter: 'business_authorization_letter',
			mobile_phone: '联系手机',
			contact_email: 'contact_email',
			license_copy: '营业执照照片',
			license_number: '注册号/统一社会信用代码',
			merchant_name: '商户名称',
			legal_person: '个体户经营者/法人姓名',
			license_address: '注册地址',
			period_begin: '营业执照 有效期限开始日期',
			period_end: '营业执照 有效期限结束日期',
			cert_copy: '登记证书照片',
			cert_type: '登记证书类型',
			cert_number: '证书号',
			merchant_name: '商户名称',
			company_address: '注册地址',
			legal_person: '法定代表人',
			period_begin: '登记证书有效期限开始日期',
			period_end: '登记证书有效期限结束日期',
			certificate_letter_copy: '单位证明函照片',
			authorize_letter_copy: '法定代表人说明函',
			id_card_copy: '身份证人像面照片',
			id_card_national: '身份证国徽面照片',
			id_card_name: '身份证姓名',
			id_card_number: '身份证号码',
			id_card_address: '身份证居住地址',
			card_period_begin: '身份证有效期开始时间',
			card_period_end: '身份证有效期结束时间',
			id_doc_copy: '身份证人像面照片',
			id_doc_copy_back: '身份证国徽面照片',
			id_doc_name: '证件姓名',
			id_doc_number: '证件号码',
			id_doc_address: '证件居住地址',
			doc_period_begin: '证件有效期开始时间',
			doc_period_end: '证件有效期结束时间',
			merchant_shortname: '商户简称',
			service_phone: '客服电话',
			settlement_id: '结算规则',
			qualification_type: '所属行业',
			qualifications: '特殊资质图片',
			bank_account_type: '银行账户类型',
			account_name: '银行开户名称',
			account_bank: '开户银行',
			bank_address_code: '开户银行省市编码',
			bank_branch_id: '开户银行联行号',
			bank_name: '开户银行全称（含支行）',
			account_number: '银行账号',
			legal_person_commitment: '法人开户承诺函',
			legal_person_video: '法人开户意愿视频',
			business_addition_pics: '补充材料',
			business_addition_msg: '补充说明',
		}
		if (obj.hasOwnProperty(e)) {
			return obj[e];
		} else {
			return null;
		}

	}
</script>

<style lang="scss" scoped>
	page {
		background-color: #fff;
	}

	.container {
		padding: 30upx;
		background-color: #fff;

		.header {
			display: flex;
			justify-content: space-between;
			font-size: 24upx;
			padding: 30upx 0;
			flex-wrap: wrap;
			justify-content: space-around;

			.headeritem {
				color: #D6D6D6;
				text-align: center;
				display: flex;
				align-items: center;
				width: 30%;

				.text {
					background-color: #D6D6D6;
					width: 30upx;
					height: 30upx;
					display: block;
					border-radius: 50%;
					color: #fff;
					margin-right: 5upx;
					line-height: 30upx;
					text-align: center;
				}
			}

			.headeritems {
				color: $color1;

				.text {
					background-color: $color1;
				}
			}
		}

		.content {
			.typelist {
				display: flex;
				justify-content: space-around;

				.typetext {
					text-align: center;
					font-size: 28upx;
				}

				image {
					width: 160upx;
					height: 120upx;
				}
			}

			.upbox {
				width: 100%;
				height: 300upx;
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: center;
				border-radius: 20upx;
				border: 1upx solid #D6D6D6;

				image {
					width: 70upx;
					height: 70upx;
				}
			}

			.upboxs {
				width: 100%;
				height: 300upx;
				border-radius: 20upx;
				border: 1upx solid #D6D6D6;

				image {
					width: 100%;
					height: 300upx;
				}

				video {
					width: 100%;
					height: 300upx;
				}
			}

			.lastbox {
				text-align: center;

				.title {
					font-size: 28upx;
					font-weight: bold;
					margin: 20upx 0;
				}

				.titles {
					font-size: 24upx;
					color: #999;

					text {
						color: $color4;
					}
				}
			}
		}

		.next {
			background-color: $color4;
			color: #fff;
			text-align: center;
			padding: 20upx;
			border-radius: 20upx;
			margin: 30upx 0;
		}

		.nexts {
			color: $color4;
			text-align: center;
			padding: 20upx;
		}
	}

	.bottom {
		color: #666666;
		padding: 20upx;
		font-size: 10px;
		text-align: center;

		text {
			color: $color4;
		}
	}

	::v-deep .uni-section-header {
		// padding: 20upx 0 0 0;
	}
</style>
